flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [1/3] git commit: [flex-asjs] [refs/heads/develop] - handle hyphens in style names. change signature to '*' to allow undefined to be returned
Date Fri, 10 May 2013 03:37:09 GMT
Updated Branches:
  refs/heads/develop 114aeec95 -> c05d6e89a


handle hyphens in style names.  change signature to '*' to allow undefined to be returned


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

Branch: refs/heads/develop
Commit: 80e53e6a3ea3c627b1432215eb6243049c41ca49
Parents: 114aeec
Author: Alex Harui <aharui@apache.org>
Authored: Thu May 9 17:14:50 2013 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Thu May 9 17:21:10 2013 -0700

----------------------------------------------------------------------
 .../as/src/org/apache/flex/core/IValuesImpl.as     |    2 +-
 .../org/apache/flex/core/SimpleCSSValuesImpl.as    |   23 +++++++++++++--
 .../src/org/apache/flex/core/SimpleValuesImpl.as   |    2 +-
 3 files changed, 22 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/80e53e6a/frameworks/as/src/org/apache/flex/core/IValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/IValuesImpl.as b/frameworks/as/src/org/apache/flex/core/IValuesImpl.as
index a684deb..530861c 100644
--- a/frameworks/as/src/org/apache/flex/core/IValuesImpl.as
+++ b/frameworks/as/src/org/apache/flex/core/IValuesImpl.as
@@ -20,7 +20,7 @@ package org.apache.flex.core
 {
 	public interface IValuesImpl
 	{
-		function getValue(thisObject:Object, valueName:String, state:String = null, attrs:Object
= null):Object;
+		function getValue(thisObject:Object, valueName:String, state:String = null, attrs:Object
= null):*;
         function getInstance(valueName:String):Object;
         
         function init(mainClass:Object):void;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/80e53e6a/frameworks/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as b/frameworks/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as
index dab5799..0993d55 100644
--- a/frameworks/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as
+++ b/frameworks/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as
@@ -168,9 +168,18 @@ package org.apache.flex.core
 
         public var values:Object;
 		
-		public function getValue(thisObject:Object, valueName:String, state:String = null, attrs:Object
= null):Object
+		public function getValue(thisObject:Object, valueName:String, state:String = null, attrs:Object
= null):*
 		{
-			var value:*;
+            var c:int = valueName.indexOf("-");
+            while (c != -1)
+            {
+                valueName = valueName.substr(0, c) +
+                    valueName.charAt(c + 1).toUpperCase() +
+                    valueName..substr(c + 2);
+                c = valueName.indexOf("-");
+            }
+
+            var value:*;
 			var o:Object;
 			var className:String;
 			var selectorName:String;
@@ -232,8 +241,16 @@ package org.apache.flex.core
 			return o[valueName];
 		}
 		
-		public function setValue(thisObject:Object, valueName:String, value:Object):void
+		public function setValue(thisObject:Object, valueName:String, value:*):void
 		{
+            var c:int = valueName.indexOf("-");
+            while (c != -1)
+            {
+                valueName = valueName.substr(0, c) +
+                    valueName.charAt(c + 1).toUpperCase() +
+                    valueName..substr(c + 2);
+                c = valueName.indexOf("-");
+            }
 			var oldValue:Object = values[valueName];
 			if (oldValue != value)
 			{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/80e53e6a/frameworks/as/src/org/apache/flex/core/SimpleValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/SimpleValuesImpl.as b/frameworks/as/src/org/apache/flex/core/SimpleValuesImpl.as
index d7dc034..eda53de 100644
--- a/frameworks/as/src/org/apache/flex/core/SimpleValuesImpl.as
+++ b/frameworks/as/src/org/apache/flex/core/SimpleValuesImpl.as
@@ -30,7 +30,7 @@ package org.apache.flex.core
 		
 		public var values:Object;
 		
-		public function getValue(thisObject:Object, valueName:String, state:String = null, attrs:Object
= null):Object
+		public function getValue(thisObject:Object, valueName:String, state:String = null, attrs:Object
= null):*
 		{
 			return values[valueName];
 		}


Mime
View raw message