flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject git commit: [flex-sdk] - FLEX-17210 Added check to see if locale exists when changing localeChain
Date Wed, 01 May 2013 00:26:18 GMT
Updated Branches:
  refs/heads/develop 4738923f3 -> ae28ab34c


FLEX-17210 Added check to see if locale exists when changing localeChain


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ae28ab34
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/ae28ab34
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/ae28ab34

Branch: refs/heads/develop
Commit: ae28ab34c558957927471d54ce2a0ca6aace6207
Parents: 4738923
Author: Justin Mclean <jmclean@apache.org>
Authored: Wed May 1 10:26:02 2013 +1000
Committer: Justin Mclean <jmclean@apache.org>
Committed: Wed May 1 10:26:02 2013 +1000

----------------------------------------------------------------------
 .../src/mx/resources/ResourceManagerImpl.as        |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ae28ab34/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as b/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
index c138a9b..ef01ea6 100644
--- a/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
+++ b/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
@@ -225,6 +225,15 @@ public class ResourceManagerImpl extends EventDispatcher implements IResourceMan
     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();
     }


Mime
View raw message