You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2017/06/03 01:43:50 UTC
[7/7] git commit: [flex-asjs] [refs/heads/develop] - temporary fix
for null/undefined issues between AS/JS
temporary fix for null/undefined issues between AS/JS
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/407cacd1
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/407cacd1
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/407cacd1
Branch: refs/heads/develop
Commit: 407cacd158576b58e1d6e7f04a52ae915e2a95f2
Parents: 2af9ded
Author: Justin Mclean <jm...@apache.org>
Authored: Sat Jun 3 11:43:06 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Sat Jun 3 11:43:06 2017 +1000
----------------------------------------------------------------------
.../src/main/flex/org/apache/flex/core/UIBase.as | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/407cacd1/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
index e524bc3..bf23ddf 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as
@@ -865,10 +865,12 @@ package org.apache.flex.core
*/
public function get view():IBeadView
{
- if (_view === null)
+ // JS undefined AS null
+ if (_view == null)
{
var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
- if (c !== null)
+ // JS undefined AS null
+ if (c != null)
{
_view = (new c()) as IBeadView;
addBead(_view);
@@ -1344,17 +1346,20 @@ package org.apache.flex.core
if (getBeadByType(IBeadModel) === null)
{
c = ValuesManager.valuesImpl.getValue(this, "iBeadModel") as Class;
- if (c !== null)
+ // JS undefined AS null
+ if (c != null)
{
var model:IBeadModel = new c as IBeadModel;
if (model)
addBead(model);
}
}
- if (_view === null && getBeadByType(IBeadView) === null)
+ // view JS undefined AS null
+ if (_view == null && getBeadByType(IBeadView) === null)
{
c = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
- if (c !== null)
+ // JS undefined AS null
+ if (c != null)
{
var view:IBeadView = new c as IBeadView;
if (view)
@@ -1364,7 +1369,8 @@ package org.apache.flex.core
if (getBeadByType(IBeadController) === null)
{
c = ValuesManager.valuesImpl.getValue(this, "iBeadController") as Class;
- if (c !== null)
+ // JS undefined AS null
+ if (c != null)
{
var controller:IBeadController = new c as IBeadController;
if (controller)