royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-asjs] 09/11: swap out public var for getter/setters. Public vars don't handle being assigned by name from MXML
Date Mon, 19 Feb 2018 00:23:08 GMT
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit ef456b9affa79e3c9da03528a02cec13b5f8e303
Author: Alex Harui <aharui@apache.org>
AuthorDate: Sun Feb 18 16:20:18 2018 -0800

    swap out public var for getter/setters.  Public vars don't handle being assigned by name
from MXML
---
 .../royale/org/apache/royale/states/AddItems.as    | 89 ++++++++++++++++++++--
 .../org/apache/royale/states/ItemAndDescriptor.as  | 22 +++++-
 .../main/royale/org/apache/royale/states/State.as  | 34 ++++++++-
 3 files changed, 132 insertions(+), 13 deletions(-)

diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/states/AddItems.as
b/frameworks/projects/Core/src/main/royale/org/apache/royale/states/AddItems.as
index ff1c1a6..993222d 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/states/AddItems.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/states/AddItems.as
@@ -52,21 +52,94 @@ package org.apache.royale.states
 			super();
 		}
 		
-        public var items:Array;
+        private var _items:Array;
         
-		public var itemsDescriptorIndex:int;     
+        public function get items():Array
+        {
+            return _items;
+        }
+        public function set items(value:Array):void
+        {
+            _items = value;
+        }
+        
+		private var _itemsDescriptorIndex:int;     
+        
+        public function get itemsDescriptorIndex():int
+        {
+            return _itemsDescriptorIndex;
+        }
+        public function set itemsDescriptorIndex(value:int):void
+        {
+            _itemsDescriptorIndex = value;
+        }
 
-        public var itemsDescriptor:ItemAndDescriptor;     
+        private var _itemsDescriptor:ItemAndDescriptor;  
         
-        public var destination:String;
+        public function get itemsDescriptor():ItemAndDescriptor
+        {
+            return _itemsDescriptor;
+        }
         
-        public var propertyName:String;
+        public function set itemsDescriptor(value:ItemAndDescriptor):void
+        {
+            _itemsDescriptor = value;
+        }
         
-        public var position:String;
+        private var _destination:String;
         
-        public var relativeTo:String;
+        public function get destination():String
+        {
+            return _destination;
+        }
+        public function set destination(value:String):void
+        {
+            _destination = value;
+        }
         
-        public var document:Object;
+        private var _propertyName:String;
+
+        public function get propertyName():String
+        {
+            return _propertyName;
+        }
+        public function set propertyName(value:String):void
+        {
+            _propertyName = value;
+        }
+
+        private var _position:String;
+        
+        public function get position():String
+        {
+            return _position;
+        }
+        public function set position(value:String):void
+        {
+            _position = value;
+        }
+        
+        private var _relativeTo:String;
+        
+        public function get relativeTo():String
+        {
+            return _relativeTo;
+        }
+        public function set relativeTo(value:String):void
+        {
+            _relativeTo = value;
+        }
+        
+        private var _document:Object;
+        
+        public function get document():Object
+        {
+            return _document;
+        }
+        public function set document(value:Object):void
+        {
+            _document = value;
+        }
         
         public function setDocument(document:Object, id:String = null):void
         {
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/states/ItemAndDescriptor.as
b/frameworks/projects/Core/src/main/royale/org/apache/royale/states/ItemAndDescriptor.as
index 0f6ad67..2f5cd09 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/states/ItemAndDescriptor.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/states/ItemAndDescriptor.as
@@ -46,6 +46,8 @@ package org.apache.royale.states
 			super();
 		}
 		
+        private var _items:Object;
+        
         /**
          *  The item or items created from the descriptor.
          *  
@@ -54,8 +56,16 @@ package org.apache.royale.states
          *  @playerversion AIR 1.1
          *  @productversion Royale 1.0.0
          */
-        public var items:Object;
+        public function get items():Object
+        {
+            return _items;
+        }
+        public function set items(value:Object):void
+        {
+            _items = value;
+        }
         
+        private var _descriptor:Array;     
         /**
          *  The descriptor used to create the item(s).
          *  
@@ -64,7 +74,15 @@ package org.apache.royale.states
          *  @playerversion AIR 1.1
          *  @productversion Royale 1.0.0
          */
-        public var descriptor:Array;     
+        
+        public function get descriptor():Array
+        {
+            return _descriptor;
+        }
+        public function set descriptor(value:Array):void
+        {
+            _descriptor = value;
+        }
         
 	}
 }
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/states/State.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/states/State.as
index 24e71db..30719d9 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/states/State.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/states/State.as
@@ -46,6 +46,8 @@ package org.apache.royale.states
 			super();
 		}
 		
+        private var _name:String;
+        
         /**
          *  The name of the state.
          *  
@@ -54,7 +56,17 @@ package org.apache.royale.states
          *  @playerversion AIR 1.1
          *  @productversion Royale 1.0.0
          */
-		public var name:String;
+        public function get name():String
+        {
+            return _name;
+        }
+        public function set name(value:String):void
+        {
+            _name = value;
+        }
+        
+        
+        private var _stateGroups:String;
         
         /**
          *  Comma-delimited list of state groups of the state.
@@ -65,7 +77,16 @@ package org.apache.royale.states
          *  @playerversion AIR 1.1
          *  @productversion Royale 1.0.0
          */
-        public var stateGroups:String;
+        public function get stateGroups():String
+        {
+            return _stateGroups;
+        }
+        public function set stateGroups(value:String):void
+        {
+            _stateGroups = value;
+        }
+        
+        private var _overrides:Array;
         
         /**
          *  The array of overrides.  This is normally set by the compiler.
@@ -75,6 +96,13 @@ package org.apache.royale.states
          *  @playerversion AIR 1.1
          *  @productversion Royale 1.0.0
          */
-        public var overrides:Array;
+        public function get overrides():Array
+        {
+            return _overrides;
+        }
+        public function set overrides(value:Array):void
+        {
+            _overrides = value;
+        }
 	}
 }

-- 
To stop receiving notification emails like this one, please contact
aharui@apache.org.

Mime
View raw message