Flex builder3 is not generating html wrapper when targeting flex 4 sdk - apache-flex

In Flex builder 3 when I create a new flex application targeting the flex 4 sdk, it wont generate a html wrapper file.
I have hunted around the web for answers, but no success. I have made sure the box is checked in the project properties to generate html wrapper.
The only workaround is to target an older version of the sdk (i.e. 3.2), which will cause the wrapper to be generated. Then I can revert the project to sdk 4. This then means I can never do a clean of my project because this will result in the wrapper being deleted.
Has anyone else come across this? Is this just a bug with Flexbuilder3?

Check the project area folder called "html-template" from the Flex Navigator Panel within Flex3. This folder may be empty. You should have 2 files in here:
index.template.html
swobject.js
These will help you generate the wrapper.

I beat my head against this a bit and after look all over the net I combined a few solutions and finally came up with one that works for me. Try this to get it to work with with out up grading to Flash Builder 4:
STEP 1
Navigate to your Flex 3 SDK and copy the following folders from YOUR 3.0 SDK PATH\templates\ to YOUR 4.0 SDK PATH\Templates\ .
-- Client-side-detection
-- Client-side-detection-with-history
-- Express-installation
-- Express-installation-with-history
-- No-player-detection
-- No-playerdetection-with-history
Note: Greg Lafrance recommends an addition folder "Swfobject" in his instructions over at ADOBE, but I didn't need that one myself.
STEP 2
Go to File -> Switch Workspace -> Other and create a COMPLETELY NEW workspace ( i.e: I called my Flex 4).
STEP 3
Create new project. Right Click it -> Flex Compiler -> Configure Flex SDKS's -> Add... -> Navigate to your Flex 4 SDK and add it. Click Ok. DO STEP 4 BEFORE CLOSING THE PROPERTIES.
Step 4.
Change "Require Flash Player Version" to 10.0.0 .
Step 5.
Click OK and erase the based code and copy over FLEX 4 Code with spark elements and what not.
Good Luck, Hope this helps someone out there in internet land who Googles this question.

It worked for me like this way.....i changed Project->properties->FlexCompilerchosed sdk flex-3 rather than flex4(my current version) then clean and build i got the html and .swf files after that i switched to SDK - Flex 4 and i ran my mxml file without any error

Turns out this is a bug with using the flex 4 sdk inside flex builder 3. My solution was to upgrade to Flash Builder 4 which has a much nicer integration between the project and the flex sdk.
Thanks

In eclipse Problems view, there will be one problem Cannot create HTML wrapper. Right-click here to recreate folder html-template. . Right click on the problem and choose Recreate HTML Templates.

Related

Upgrading Bootstrap

I'm upgrading bootstrap 3.3.6 to 3.4.1. First need to first I need to find all the places(HTML elements) that use bootstrap 3.3.6 so I can do my regression testing covering those elements. Is there a way I can find all the bootstrap references?
This is a .net application with razor views
Thanks
You can do it via search text feature in your IDE like CTRL + Shift + F in visual Studio and Rider (assume it set Visual Studio Key-map), Which provides you with tools such :
Preview of codes before navigate to it.
Search a term in specific files (.cs, .cs-html, ...).
Search a term with regular expression.
...
For example assume we need to find all div which is have row class ( my IDE is rider), so all you can do, after open "find in files" popup, is just set simple things like image below:

Flex: build error - runtime-shared-library-path

I recently switched a Flex project over to using RSLs. It built fine for quite a while but has recently dug its heels in and is giving me this error:
configuration variable 'runtime-shared-library-path' requires a value for 'rsl-url'
I went through all the flex XML files I could find and either this value doesn't exist or there are entries available for it. Nowhere did I see a <rs-url></rs-url> with no value.
Clearly this points to some deeper issue. Suggestions on where to look?
In Flash Builder, this value is edited through the project properties under the Flex Build Paths menus. Normally you should see your referenced library here. Double click on the "Link Type" line. Be sure link type is setted to RSL and click the Add button on the right to add a new URL path for your RSL. I suggest you use you main SWF root as it's simplier (ex : myRSLlibrary.swf).

After exporting a flex project, the images are broken

After completing building a flex project in Flash Builder 4.5, the project was exported using the
File -> Export Flash Builder Project.
After which some of the images stopped working (get the broken image icon). This has left me clueless and even search on the internet did not give me good answers...
I get the same problem time to time. Probably compiler / Flash Builder bug. But to be sure, you might want to check some basic things. First off: check that you have correct image urls. Secondly, ensure you are not using absolute source paths (e.g. C:\workspace\project\src\assets\images\image.png). Instead use relative path (i.e. assets\images\image.png).
If these are correct, check your build directory (default build directory for release builds in FB is bin-release) and see if the images are compiled there correctly. As I said, for some reason my FB does not always compile all the assets correctly, so sometimes I have to move them in manually. That is, you can simply drag and drop them from the source directory to the bin-release directory (although if you are using svn, you should be careful with this as it might copy also the svn metadata).
Other solutions you might want to try:
restart eclipse / FB (maybe it's simply out of memory)
delete the project from your workspace and import it again with no project information
change workspace and import the project there
I finally found the answer... made all the images bindable and just used the class to tag the images.
for example... instead of
if (draggedImage.id == "Chris" )
{
newImage.source = "assets/Chris.png";
}
changed it to
if (draggedImage.id == "Chris" )
{
newImage.source = pic3_icon;
}

Using qnx.ui.picker.Picker in mobile Flex Hero project for Blackberry Playbook

there is a Picker example for usage in an ActionScript project. It works well in simulator.
But how do you use that component in a Mobile Flex Project (with Burrito Flash Builder)?
How do you add a qnx.ui.picker.Picker to a spark.components.View?
The latter seems to expect a mx.core.UIComponent, but the former is a qnx.ui.core.UIComponent.
The ActionScript project I've mentioned above works ok, because the Picker is added to the Sprite. But adding it to a View in a Mobile Flex project fails for me.
Thank you!
Alex
UPDATE:
I've found this page today: http://corlan.org/2011/03/28/creating-playbook-apps-with-flex-and-qnx-ui-components/
And also I've found out that the QNX AIR components work on Android as well, wonder if it is legal to use them there? Nothing is mentioned in Playbook SDK Legal Notice.
As I understand, right now we can't use UI components in Flex Mobile project.
You can go to: Project - Properties - Flex Build Packaging - BlackBerry Tablet OS and check Include BlackBerry tablet OS libraries in build path, but, you'll get an error:
"Design mode could not load qnx-air.swc. It may be incompatible with this SDK, or invalid. (DesignAssetLoader.CompleteTimeout)"
BlackBerry guys says that it'll be fixed in future release. So right now you can use QNX components only in ActionScript.
First you need to add the swc from the SDK into your Flex Project:
Right click the Project and select Properties,
under Flex Build Path, add a SWC and browse to the SDK.
...\Adobe Flash Builder Burrito\sdks\blackberry-tablet-sdk-0.9.3\frameworks\libs\qnx-screen\qnx-screen.swc
Once you have the swc in the project you can create instances programmatically in the script tag, eg:
import qnx.ui.picker.Picker;
var pick:Picker = new Picker();
var arr:Array = [{label: "day", data:0}, {label: "week", data:1}, {label: "month", data:2}];
pick.dataProvider = new DataProvider([new DataProvider(arr)]);
pick.selectedIndices = [0];
addChild(pick);
You may need to add a container to your view first, eg add a mx:UIComponent element and then add the picker to that, eg
<mx:UIComponent id="pickerContainer"/>
pickerContainer.addChild(pick);

Adobe AIR: Controls flipped (mirrored) in certain build environments

I'm having an issue where certain controls are flipped, depending on the machine that I'm building my project on. On my development machine, when I build it, everything is okay. However, when I build it on our build server, some things are flipped. It seems to be things that are on a higher layer - for instance, options in the select control (see first image below), alerts/overlays (see second image below), etc. It's not just the text, either - the entire content is flipped, images and all.
I have verified that the code is exactly the same in both instances, so it must have something to do with settings or the flex SDK version. On my development machine, the Flex SDK version is 4.0.0.14159, and on the build server, the Flex SDK version is 4.1.0.16076. I can downgrade the SDK on the build server if needed - but could it really be an issue with the SDK? Any ideas?
Thanks!
It looks like this will be fixed in the 4.5 SDK--see SDK-26473 for workarounds.
I was able to fix the mirroring by turning off Flex 3 Compatibility Mode in the Flex compiler settings (if using mxmlc, -compatibility-version=4.0).
Your build machine must be set to a locale which uses right-to-left text, such as Hebrew or Arabic keyboard setting.
Oops - hadn't read all of dpstone's answer before I posted my comment to the question.
The answer to this problem is in the bug he linked to. You need to explicitly set the layout direction. You can do this in one of two ways.
1) in a .css file that you import into your main application file:
global
{
layoutDirection: "ltr";
}
OR
2) you can set it in a <style> tag in your main application file.
<mx:Style>
global
{
layoutDirection: "ltr";
}
</mx:Style>

Resources