You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/12/01 10:14:20 UTC
[2/5] git commit: [flex-asjs] [refs/heads/core_js_to_as] - refactor
addBead so we can set _view in all cases
refactor addBead so we can set _view in all cases
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/7cec0a57
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7cec0a57
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7cec0a57
Branch: refs/heads/core_js_to_as
Commit: 7cec0a57da79653439b0c99eb2f058fbedaafaac
Parents: 369541a
Author: Alex Harui <ah...@apache.org>
Authored: Mon Nov 30 16:44:26 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Nov 30 16:44:26 2015 -0800
----------------------------------------------------------------------
.../as/src/org/apache/flex/core/HTMLElementWrapper.as | 13 +++++++++++--
.../Core/as/src/org/apache/flex/core/UIBase.as | 9 +--------
2 files changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7cec0a57/frameworks/projects/Core/as/src/org/apache/flex/core/HTMLElementWrapper.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/HTMLElementWrapper.as b/frameworks/projects/Core/as/src/org/apache/flex/core/HTMLElementWrapper.as
index a7779fb..bc8e224 100644
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/HTMLElementWrapper.as
+++ b/frameworks/projects/Core/as/src/org/apache/flex/core/HTMLElementWrapper.as
@@ -19,7 +19,13 @@ package org.apache.flex.core
COMPILE::AS3
public class HTMLElementWrapper extends Sprite
{
-
+ /**
+ * "abstract" method so we can override in JS
+ * @param bead The new bead.
+ */
+ public function addBead(bead:IBead):void
+ {
+ }
}
COMPILE::JS
@@ -81,7 +87,10 @@ package org.apache.flex.core
_element = value;
}
- private var _model:IBeadModel;
+ /**
+ * allow access from overrides
+ */
+ protected var _model:IBeadModel;
/**
* @flexjsignorecoercion Class
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7cec0a57/frameworks/projects/Core/as/src/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/UIBase.as b/frameworks/projects/Core/as/src/org/apache/flex/core/UIBase.as
index 9a4cf16..0cd6a7c 100644
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/UIBase.as
+++ b/frameworks/projects/Core/as/src/org/apache/flex/core/UIBase.as
@@ -1016,8 +1016,7 @@ package org.apache.flex.core
* @playerversion AIR 2.6
* @productversion FlexJS 0.0
*/
- COMPILE::AS3
- public function addBead(bead:IBead):void
+ override public function addBead(bead:IBead):void
{
if (!_beads)
_beads = new Vector.<IBead>;
@@ -1317,13 +1316,7 @@ package org.apache.flex.core
{
var view:IBeadView = new c as IBeadView;
if (view)
- {
- COMPILE::JS
- {
- _view = view;
- }
addBead(view);
- }
}
}
if (getBeadByType(IBeadController) == null)