Why are my Flex resource bundles not being loaded?

Posted by Chris R on Stack Overflow See other posts from Stack Overflow or by Chris R
Published on 2010-04-07T22:38:28Z Indexed on 2010/04/07 22:43 UTC
Read the original article Hit count: 282

I have an Actionscript module in the flex source folder filterModules, which is one of two additional source folders in my project (the main source folder is reports, but I'm not dealing with anything in there right now).

Here's the MXML content that references the resources. ...

This array is assigned to the dataProvider field of a ComboBox. It's not bound using the bindings, presumably for reasons that made sense to the original developer, and it'd be nontrivial to change the class to make that happen.

I additionally have a resource property file in a folder resources/en_US and I have the source folder resources/{locale} in the project source settings. My additional compiler options are -locale en_US.

The resource property file is resources/en_US/labels.properties (All paths are relative to the flash builder project root) and contains (amongst other things) these keys:

metric.q3 = Overall Satisfaction
metric.q5 = Personnel
metric.q9a = Issue Resolution
metric.q42 = Visit Duration Sat
metric.q34 = Visit Duration

I have written some FlexUnit tests that run in my local Flash Player that exercise these resources -- they check that every label is represented in the metrics array, for example, so I know that the resource file is loaded when run locally. However, when I copy the module .swf file over to my server, the combo box to which the array is assigned is empty.

I copy the .swf like so, if it matters:

rsync -rlDv --inplace -T /tmp ~/projects/flex_reports/bin-debug/rankingFilter.swf HOSTNAME:WEBROOT/flashPath/

Why is this?

I am not able to debug the remote module because our surrounding site sets up a lot of context and makes some database calls to determine which module to load. I'm hoping to get some pointers on why resource bundles might not show up. I'd understand it if the array was present with wrong labels, but the array is instead completely empty, which is pretty odd.

© Stack Overflow or respective owner

Related posts about flex

Related posts about flex4