You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by raygan <ra...@appliedrec.com> on 2014/10/06 21:51:25 UTC
error with resourceManager and Flex 4.13 + FB 4.6
I'd like to compile all the resource files for different language locales
into the main SWF.
Here is error message at runtime:
Error: Could not find compiled locale 'en_US'.
at
mx.resources::ResourceManagerImpl/setlocaleChain()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as:248]
at [C:\src\CurrentDev\FBUI\Flex\src\FBapp.as:180]
Odd thing is that if I don't set resourceManager.localChain with anything it
works fine and loads all menu, dialog, etc. strings with no issues for
English.
*Code snippet for line 180 of main app:
*
var sortedLocales:Array = availableLanguages;
//availableLanguages = ["en_US"]
Log.log("Original locale chain =
"+resourceManager.localeChain);
180 resourceManager.localeChain = sortedLocales;
*Original locale chain returns NULL above in log file*
*Compiler options:*
-locale=en_US -source-path=../resources/locale/{locale}
[ that path exists for "en_US" and contains the necessary components ]
*from app.xml file:*
<include-libraries append="true">
<library>${flexlib}/locale/en_US/framework_rb.swc</library>
</include-libraries>
*from build.def.xml:*
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<load-config filename="${FLEX_HOME}/frameworks/air-config.xml"/>
${LCL_LOCALS}
<source-path path-element="${FLEX_HOME}/frameworks"/>
<source-path
path-element="${APP_ROOT}/../../ActionScriptExternalLibs"/>
<source-path path-element="${APP_ROOT}/resources/locale/en_US"/>
<include-resource-bundles>common</include-resource-bundles>
<include-resource-bundles>menu</include-resource-bundles>
<include-resource-bundles>commands</include-resource-bundles>
<include-resource-bundles>notifications</include-resource-bundles>
<include-resource-bundles>dialogs</include-resource-bundles>
<include-resource-bundles>shortcutKeys</include-resource-bundles>
<include-resource-bundles>utilityPanes</include-resource-bundles>
<include-resource-bundles>pages</include-resource-bundles>
<include-resource-bundles>tooltips</include-resource-bundles>
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs" />
</compiler.library-path>
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/error-with-resourceManager-and-Flex-4-13-FB-4-6-tp8315.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: error with resourceManager and Flex 4.13 + FB 4.6
Posted by Alex Harui <ah...@adobe.com>.
On 10/6/14, 12:51 PM, "raygan" <ra...@appliedrec.com> wrote:
>I'd like to compile all the resource files for different language locales
>into the main SWF.
>
>Here is error message at runtime:
>Error: Could not find compiled locale 'en_US'.
> at
>mx.resources::ResourceManagerImpl/setlocaleChain()[/Users/aharui/release4.
>13.0/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
>:248]
> at [C:\src\CurrentDev\FBUI\Flex\src\FBapp.as:180]
This call stack looks like you are using ResourceManager from an
ActionScript-only project.
I don¹t recall off-hand if that is supported, but assuming it is, I
suspect the issue is that the resource manager isn¹t initialized by the
time your code runs.
-Alex