flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jagan Langa (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-33632) Getting Run Time Error when loading resource module at runtime.
Date Thu, 25 Jul 2013 08:59:52 GMT

    [ https://issues.apache.org/jira/browse/FLEX-33632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13719406#comment-13719406
] 

Jagan Langa commented on FLEX-33632:
------------------------------------

Following is the ANT script snippet used to build my app. I have marked the locale = "" because
we tend to load them at run time. since our application support multi-language and the language
is decided at the time user log's in. red color highlights might give you guys a clue to corner
the issue.

<mxmlc locale="" 
				file="${ROOT}/src/@{app}.mxml" 
				output="@{dest}/@{app}.swf" 
				allow-source-path-overlap="true" 
				link-report="@{dest}/${LINK_REPORT_XML}" 
				static-rsls="false" 
				optimize="true" 
				services="@{services}" 
				incremental="false" fork="true">

 And This is how we set the locale to the SWF in the html wrapper

 flashvars.localeChain = "en_US";
 flashvars.resourceModuleURLs = "locale/en_US/strings.swf";
                
> Getting Run Time Error when loading resource module at runtime. 
> ----------------------------------------------------------------
>
>                 Key: FLEX-33632
>                 URL: https://issues.apache.org/jira/browse/FLEX-33632
>             Project: Apache Flex
>          Issue Type: Bug
>    Affects Versions: Apache Flex 4.10.0
>         Environment: windows 7
>            Reporter: Jagan Langa
>            Assignee: Alex Harui
>              Labels: easyfix
>
> Im getting the following error. when i try to load my application. Its working fine in
4.9.1 but not in 4.10.0 rc3 . I load my resource module at runtime.
> Error: Could not find compiled locale 'en_US'.
> 	at mx.resources::ResourceManagerImpl/set localeChain()[/Users/justinmclean/Documents/ApacheFlex4.10/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as:234]
> 	at mx.resources::ResourceManagerImpl/processInfo()[/Users/justinmclean/Documents/ApacheFlex4.10/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as:458]
> 	at mx.resources::ResourceManagerImpl()[/Users/justinmclean/Documents/ApacheFlex4.10/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as:141]
> 	at mx.resources::ResourceManager$/getInstance()[/Users/justinmclean/Documents/ApacheFlex4.10/frameworks/projects/framework/src/mx/resources/ResourceManager.as:125]
> 	at mx.core::ResourceModuleRSLItem/load()
> 	at mx.core::RSLListLoader/loadNext()
> 	at mx.core::RSLListLoader/load()
> 	at mx.preloaders::Preloader/timerHandler()
> 	at flash.utils::Timer/_timerDispatch()
> 	at flash.utils::Timer/tick()
> when i compared the ResourceManagerImpl.as file of .10.4.0 rc3 with 4.9.0 there is only
one change in the code. you have added a new for-each loop.
> public function set localeChain(value:Array /* of String */):void
>     {
>         _localeChain = value;
> 		
> 		for each (var locale:String in value)
> 		{
> 			if (!localeMap.hasOwnProperty(locale))
> 			{
> 				throw new Error(
> 					"Could not find compiled locale '" + locale + "'.");	
> 			}
> 		}
>         
>         update();
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message