flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [24/28] git commit: [flex-asjs] [refs/heads/develop] - fix up state-dependent deferred instantiation (phase 1). Phase 2, shared-instances, due next
Date Tue, 11 Nov 2014 22:08:40 GMT
fix up state-dependent deferred instantiation (phase 1).  Phase 2, shared-instances, due next


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

Branch: refs/heads/develop
Commit: 437efb2f4fcda96cdf38f3ff694f713bd159759c
Parents: 0470384
Author: Alex Harui <aharui@apache.org>
Authored: Tue Nov 11 12:58:46 2014 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Nov 11 14:08:00 2014 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/mx/states/AddItems.js        | 12 ++++++------
 .../FlexJS/src/org/apache/flex/core/ContainerBase.js  |  7 +++++++
 .../src/org/apache/flex/core/SimpleStatesImpl.js      | 14 +++++++++-----
 3 files changed, 22 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/437efb2f/frameworks/js/FlexJS/src/mx/states/AddItems.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/mx/states/AddItems.js b/frameworks/js/FlexJS/src/mx/states/AddItems.js
index a8bac93..bcc84f8 100644
--- a/frameworks/js/FlexJS/src/mx/states/AddItems.js
+++ b/frameworks/js/FlexJS/src/mx/states/AddItems.js
@@ -44,15 +44,15 @@ mx.states.AddItems.prototype.FLEXJS_CLASS_INFO =
 mx.states.AddItems.prototype.setDocument = function(document, opt_id) {
   opt_id = typeof opt_id !== 'undefined' ? opt_id : null;
   this.document = document;
-  var data = document.mxmlsd[itemsDescriptorIndex];
+  var data = document['mxmlsd'][this.itemsDescriptorIndex];
   if (typeof(data.slice) == 'function') {
-    itemsDescriptor = {};
-    itemsDescriptor.descriptor = data;
+    this.itemsDescriptor = {};
+    this.itemsDescriptor.descriptor = data;
     // replace the entry in the document so subsequent
     // addItems know it is shared
-    document.mxmlsd[itemsDescriptorIndex] = itemsDescriptor;
+    this.document['mxmlsd'][this.itemsDescriptorIndex] = this.itemsDescriptor;
   } else
-    itemsDescriptor = data;
+    this.itemsDescriptor = data;
 };
 
 
@@ -80,7 +80,7 @@ mx.states.AddItems.prototype.itemsDescriptorIndex = -1;
 
 /**
  * @expose
- * @type {Array} itemsDescriptor The descriptors for items.
+ * @type {Object} itemsDescriptor The descriptors for items.
  */
 mx.states.AddItems.prototype.itemsDescriptor = null;
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/437efb2f/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
index 5df912a..50212ac 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
@@ -44,6 +44,13 @@ org.apache.flex.core.ContainerBase.prototype.mxmlDescriptor = null;
 
 
 /**
+ * @expose
+ * @type {Array}
+ */
+org.apache.flex.core.ContainerBase.prototype.mxmlsd = null;
+
+
+/**
  * Metadata
  *
  * @type {Object.<string, Array.<Object>>}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/437efb2f/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
index b5bd91f..9022862 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
@@ -81,8 +81,12 @@ org.apache.flex.core.SimpleStatesImpl.prototype.set_strand =
  */
 org.apache.flex.core.SimpleStatesImpl.prototype.initialStateHandler_ =
     function(event) {
+	/**
+	 *  @type {Object}
+	**/
+    var host = this.strand_;
     this.dispatchEvent(new org.apache.flex.events.ValueChangeEvent('currentStateChanged',
null,
-      this.strand_.get_currentState()));
+      host.get_currentState()));
   };
 
 
@@ -185,10 +189,10 @@ org.apache.flex.core.SimpleStatesImpl.prototype.apply_ = function(s)
{
       if (!o.items) {
         o.items = o.itemsDescriptor.items;
         if (o.items == null) {
-          ai.items =
-              MXMLDataInterpreter.generateMXMLArray(o.document,
-                                    null, ai.itemsDescriptor.descriptor);
-          o.itemsDescriptor.items = ai.items;
+          o.items =
+              org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray(o.document,
+                                    null, o.itemsDescriptor.descriptor);
+          o.itemsDescriptor.items = o.items;
         }
       }
 


Mime
View raw message