It's difficult to figure out what you're asking. Can you post some sample code with just the Alert portion? Should be pretty simple to solve.
<?xml version="1.0"?> <!-- controls\alert\AlertSimple.mxml --> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <fx:Script> <![CDATA[ import mx.controls.Alert; ]]> </fx:Script> <s:VGroup> <s:TextInput id="myInput" width="150" text=""/> <s:Button id="myButton" label="Copy Text" click="myText.text = myInput.text; Alert.show('Text Copied!', 'Alert Box', mx.controls.Alert.OK);"/> <s:TextInput id="myText"/> </s:VGroup> </s:Application>
Tested on Flex 4.1 SDK, the label displays "OK" in my case.
What locale do you use along with your Flex application?
My compiler arguments (in FlexBuilder 3):
-locale=en_US -library-path+=D:\flexSDKs\4.1\frameworks\locale\en_US -source-path+=D:\flexSDKs\4.1\frameworks\locale\en_US
I tried to use only -locale=en_US, it's not working.
I tried to use -locale=en_US -library-path+=D:\flexSDKs\4.1\frameworks\locale\en_US, it was the same result
Hmmm, please share your project in FXP format, really cannot reproduce your issue with Alert label null using my setup, same locale, same SDK.
Option "File > Export Flex Project (FXP)" is only in FlexBuilder 4 (I have FlexBuilder 3), so I uploaded zip file with my test project. It's here:
Try your project locally on Flex 4.1, the Alert OK button displays OK any time I run the app.
Is "controls.properties" file located at the right place within SDK?
What static Alert's property "okLabel" returns?
My controls.properties file is here:
C:\flexSDK\4.1\frameworks\projects\framework\bundles\en_US and this file is empty (is it right?).
My Alert's property "okLabel" is null.
Thanks for trying to help me.
1 person found this helpful
try updating your SDK
Do you mean that content of "controls.properties" file is empty?
If yes, this is does not look that you are using the correct package of Flex SDK.
The correct listing of this file can be viewed here:
Yes, I used "Adobe Flex SDK" instead of "Open Source Flex SDK".
Thank you very much for your help