Flex: Unable To Open Locale

When you’re working with locales in Flex, you would put in the following code in you ant build file:

<mxmlc>
<locale>it_IT</locale>
<source-path path-element=”locale/it_IT”/>
<include-resource-bundles>formlabels</include-resource-bundles> <source-path path-element=”${FLEX_HOME}/frameworks”/> <output>bin/formlabels_it_IT.swf</output>
</mxmlc>

Then when you get a puzzling error:

[mxmlc] C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\frameworks\flex-config.xml(75): Error: unable to open ‘locale/it_IT’

But don’t you have that exact directory? Well, apparently Flex is actually looking for the it_IT folder in its locale folder. The solutions is to just create an empty it_IT folder:

<macrodef name=”compileLocale” description=”Compiles the Resource package for the given locale”>
<attribute name=”locale” default=”en_US”/>
<attribute name=”outputdir” default=”bin-debug”/>
<sequential>
<!– Create the Flex Home directory for the language in question. This is necessary to compensate for a bug in pre-3.2 releases of mxmlc. –>
<mkdir dir=”${FLEX_HOME}/frameworks/locale/@{locale}”/>

<!– Invoke MXMLC –> <mxmlc> <locale>@{locale}</locale> <source-path path-element=”locale/{locale}”/> <include-resource-bundles>formlabels</include-resource-bundles> <source-path path-element=”${FLEX_HOME}/frameworks”/> <output>@{outputdir}/formlabels_@{locale}.swf</output>
</mxmlc>
</sequential>
</macrodef>

Thanks to Adobe Cookbooks for the solution!

 

Downloading Adobe’s “Flex In A Week” Videos

Adobe, in it’s arguably self-serving pursuit to make Flex more popular offered an online training module called Flex In A Week. Admittedly, it’s quite good. I’ve been using it but watching it online just doesn’t work for me since I don’t have continuous Internet access.

I tried their suggestion for watching the videos online. Unfortunately, it means installing Adobe Media Player (which is yet another sucky media player) and adding the RSS feed http://sessions.adobe.com/FlexInAWeek/feed.xml to My Favorites. Problem is that AMP sucks and it can cache only a few videos at a time.

Fortunately, there is a better solution. Simply go to the RSS feed in Firefox (click the link or copy-and-paste it into the address box) and download the media files from the links on the resulting page. You can now watch it with your favorite media player such as VLC. That’s it!

2008 March 30 to April 4 Hong Kong Trip

Just came back with Jeff and Racquel from a trip to Hong Kong for a seminar by Adobe on InDesign CS3 development, Flex development, and a preview of the upcoming InDesign CS4.

The seminar was conducted by a bunch of soft-spoken Europeans (Ferdinand, Emanuele, Andreas, and Roger) and a fast-speaking Hong Konger named Sunny (or maybe Sony for “So!” his favorite expression). The attendees were a bunch of Filipinos (that’s us), Thais, Indians, Koreans, a Hong Konger, and an Australian. Quite an international mix.

The material was a pretty interesting (though I couldn’t resist getting drowsy every right about after lunch). InDesign CS3 and Flex development were cool but the InDesign CS4 preview almost blew me away (almost, we try to be unflappable) but I’m on an NDA so I can tell you but then I’ll have to kill you :P A lot of material was covered so we we’re pretty occupied. We did get to go around the city on the first day and at night after the seminar sessions.

Continue reading “2008 March 30 to April 4 Hong Kong Trip”