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:44 UTC
[1/7] git commit: [flex-asjs] [refs/heads/develop] - remove blank
statement
Repository: flex-asjs
Updated Branches:
refs/heads/develop f730c0cfd -> 407cacd15
remove blank statement
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ae3fbe3e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ae3fbe3e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ae3fbe3e
Branch: refs/heads/develop
Commit: ae3fbe3e60a1cadc82820cc10ac13c30e6ed6c08
Parents: 6f03502
Author: Justin Mclean <jm...@apache.org>
Authored: Fri Jun 2 14:23:15 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Fri Jun 2 14:23:15 2017 +1000
----------------------------------------------------------------------
.../projects/Basic/src/main/flex/org/apache/flex/core/UIBase.as | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ae3fbe3e/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 d917b8d..94cfef5 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
@@ -1509,7 +1509,7 @@ package org.apache.flex.core
var newStyle:Object = {};
newStyle[value.propertyName] = value.newValue;
ValuesManager.valuesImpl.applyStyles(this, newStyle);
- };
+ }
/**
* @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
Re: [3/7] git commit: [flex-asjs] [refs/heads/develop] - use === and
!== where needed
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
Can you provide a bit more information on how it is broken? Can you point to any failing tests for instance or provide sample code?
I’m using these changes in a project and have't noticed any issues and tests are still passing.
IMO it would be better to try and pinpoint the issue rather than revert all of the changes which looks like you’ve done here.
For instance these lines have been incorrectly changed:
var strpixels:String = positioner.style.width as String;
- if (strpixels !== null && strpixels.indexOf('%') != -1)
+ if (strpixels !== null && strpixels.indexOf('%') !== -1)
Thanks,
Justin
Re: [3/7] git commit: [flex-asjs] [refs/heads/develop] - use === and !== where needed
Posted by Harbs <ha...@gmail.com>.
new UIBase() simply no longer worked…
> On Jun 21, 2017, at 6:34 PM, piotrz <pi...@gmail.com> wrote:
>
> Actually it would be good if you could point some UI scenario where it breaks
> something if it is possible.
>
> Thanks,
> Piotr
>
>
>
> -----
> Apache Flex PMC
> piotrzarzycki21@gmail.com
> --
> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-3-7-git-commit-flex-asjs-refs-heads-develop-use-and-where-needed-tp62525p62528.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [3/7] git commit: [flex-asjs] [refs/heads/develop] - use ===
and !== where needed
Posted by piotrz <pi...@gmail.com>.
Actually it would be good if you could point some UI scenario where it breaks
something if it is possible.
Thanks,
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-3-7-git-commit-flex-asjs-refs-heads-develop-use-and-where-needed-tp62525p62528.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [3/7] git commit: [flex-asjs] [refs/heads/develop] - use ===
and !== where needed
Posted by piotrz <pi...@gmail.com>.
I just respond to your commit with question what happened, but ok. If it is
breaking some basic things.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-3-7-git-commit-flex-asjs-refs-heads-develop-use-and-where-needed-tp62525p62527.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [3/7] git commit: [flex-asjs] [refs/heads/develop] - use === and !== where needed
Posted by Harbs <ha...@gmail.com>.
This commit broke UIBase.
I’m reverting a lot of these strict equalities.
> On Jun 3, 2017, at 4:43 AM, jmclean@apache.org wrote:
>
> use === and !== where needed
>
>
> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4eb2f8b1
> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4eb2f8b1
> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4eb2f8b1
>
> Branch: refs/heads/develop
> Commit: 4eb2f8b168e4857b33163a36d8e98b56550fc39c
> Parents: 282125c
> Author: Justin Mclean <jm...@apache.org>
> Authored: Fri Jun 2 19:48:19 2017 +1000
> Committer: Justin Mclean <jm...@apache.org>
> Committed: Fri Jun 2 19:48:19 2017 +1000
>
> ----------------------------------------------------------------------
> .../main/flex/org/apache/flex/core/UIBase.as | 80 ++++++++++----------
> 1 file changed, 40 insertions(+), 40 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4eb2f8b1/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 04615c3..e242fd6 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
> @@ -202,7 +202,7 @@ package org.apache.flex.core
> */
> public function set explicitWidth(value:Number):void
> {
> - if (_explicitWidth == value)
> + if (_explicitWidth === value)
> return;
>
> // width can be pixel or percent not both
> @@ -235,7 +235,7 @@ package org.apache.flex.core
> */
> public function set explicitHeight(value:Number):void
> {
> - if (_explicitHeight == value)
> + if (_explicitHeight === value)
> return;
>
> // height can be pixel or percent not both
> @@ -272,7 +272,7 @@ package org.apache.flex.core
> public function set percentWidth(value:Number):void
> {
> COMPILE::SWF {
> - if (_percentWidth == value)
> + if (_percentWidth === value)
> return;
>
> if (!isNaN(value))
> @@ -315,7 +315,7 @@ package org.apache.flex.core
> public function set percentHeight(value:Number):void
> {
> COMPILE::SWF {
> - if (_percentHeight == value)
> + if (_percentHeight === value)
> return;
>
> if (!isNaN(value))
> @@ -369,7 +369,7 @@ package org.apache.flex.core
> {
> var pixels:Number;
> var strpixels:String = positioner.style.width as String;
> - if (strpixels !== null && strpixels.indexOf('%') != -1)
> + if (strpixels !== null && strpixels.indexOf('%') !== -1)
> pixels = NaN;
> else
> pixels = parseFloat(strpixels);
> @@ -389,7 +389,7 @@ package org.apache.flex.core
> COMPILE::SWF
> override public function set width(value:Number):void
> {
> - if (explicitWidth != value)
> + if (explicitWidth !== value)
> {
> explicitWidth = value;
> }
> @@ -403,7 +403,7 @@ package org.apache.flex.core
> COMPILE::JS
> public function set width(value:Number):void
> {
> - if (explicitWidth != value)
> + if (explicitWidth !== value)
> {
> explicitWidth = value;
> }
> @@ -461,7 +461,7 @@ package org.apache.flex.core
> {
> var pixels:Number;
> var strpixels:String = positioner.style.height as String;
> - if (strpixels !== null && strpixels.indexOf('%') != -1)
> + if (strpixels !== null && strpixels.indexOf('%') !== -1)
> pixels = NaN;
> else
> pixels = parseFloat(strpixels);
> @@ -481,7 +481,7 @@ package org.apache.flex.core
> COMPILE::SWF
> override public function set height(value:Number):void
> {
> - if (explicitHeight != value)
> + if (explicitHeight !== value)
> {
> explicitHeight = value;
> }
> @@ -495,7 +495,7 @@ package org.apache.flex.core
> COMPILE::JS
> public function set height(value:Number):void
> {
> - if (explicitHeight != value)
> + if (explicitHeight !== value)
> {
> explicitHeight = value;
> }
> @@ -528,7 +528,7 @@ package org.apache.flex.core
> */
> public function setHeight(value:Number, noEvent:Boolean = false):void
> {
> - if (_height != value)
> + if (_height !== value)
> {
> _height = value;
> COMPILE::JS
> @@ -550,7 +550,7 @@ package org.apache.flex.core
> */
> public function setWidth(value:Number, noEvent:Boolean = false):void
> {
> - if (_width != value)
> + if (_width !== value)
> {
> _width = value;
> COMPILE::JS
> @@ -572,7 +572,7 @@ package org.apache.flex.core
> */
> public function setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void
> {
> - if (_width != newWidth)
> + if (_width !== newWidth)
> {
> _width = newWidth;
> COMPILE::JS
> @@ -582,7 +582,7 @@ package org.apache.flex.core
> if (!noEvent)
> dispatchEvent(new Event("widthChanged"));
> }
> - if (_height != newHeight)
> + if (_height !== newHeight)
> {
> _height = newHeight;
> COMPILE::JS
> @@ -799,7 +799,7 @@ package org.apache.flex.core
> }
> else
> {
> - if (displayStyleForLayout != null)
> + if (displayStyleForLayout !== null)
> positioner.style.display = displayStyleForLayout;
> dispatchEvent(new Event('show'));
> }
> @@ -831,7 +831,7 @@ package org.apache.flex.core
> COMPILE::SWF
> public function get model():Object
> {
> - if (_model == null)
> + if (_model === null)
> {
> // addbead will set _model
> addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBead);
> @@ -845,7 +845,7 @@ package org.apache.flex.core
> COMPILE::SWF
> public function set model(value:Object):void
> {
> - if (_model != value)
> + if (_model !== value)
> {
> addBead(value as IBead);
> dispatchEvent(new Event("modelChanged"));
> @@ -865,10 +865,10 @@ package org.apache.flex.core
> */
> public function get view():IBeadView
> {
> - if (_view == null)
> + if (_view === null)
> {
> var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
> - if (c)
> + if (c !== undefined)
> {
> _view = (new c()) as IBeadView;
> addBead(_view);
> @@ -882,7 +882,7 @@ package org.apache.flex.core
> */
> public function set view(value:IBeadView):void
> {
> - if (_view != value)
> + if (_view !== value)
> {
> addBead(value as IBead);
> dispatchEvent(new Event("viewChanged"));
> @@ -909,7 +909,7 @@ package org.apache.flex.core
> */
> public function set id(value:String):void
> {
> - if (_id != value)
> + if (_id !== value)
> {
> _id = value;
> dispatchEvent(new Event("idChanged"));
> @@ -945,7 +945,7 @@ package org.apache.flex.core
> */
> public function set style(value:Object):void
> {
> - if (_style != value)
> + if (_style !== value)
> {
> if (value is String)
> {
> @@ -993,7 +993,7 @@ package org.apache.flex.core
> */
> public function set className(value:String):void
> {
> - if (_className != value)
> + if (_className !== value)
> {
> COMPILE::JS
> {
> @@ -1095,7 +1095,7 @@ package org.apache.flex.core
> for (var i:int = 0; i < n; i++)
> {
> var bead:IBead = _beads[i];
> - if (bead == value)
> + if (bead === value)
> {
> _beads.splice(i, 1);
> return bead;
> @@ -1190,7 +1190,7 @@ package org.apache.flex.core
> COMPILE::JS
> {
> var children:Array = internalChildren();
> - if (children.length == 0)
> + if (children.length === 0)
> {
> return null;
> }
> @@ -1221,7 +1221,7 @@ package org.apache.flex.core
> var n:int = children.length;
> for (var i:int = 0; i < n; i++)
> {
> - if (children[i] == c.element)
> + if (children[i] === c.element)
> return i;
> }
> return -1;
> @@ -1302,11 +1302,11 @@ package org.apache.flex.core
> if (value is String)
> {
> var s:String = String(value);
> - if (s.indexOf("%") != -1)
> + if (s.indexOf("%") !== -1)
> _percentWidth = Number(s.substring(0, s.length - 1));
> else
> {
> - if (s.indexOf("px") != -1)
> + if (s.indexOf("px") !== -1)
> s = s.substring(0, s.length - 2);
> _width = _explicitWidth = Number(s);
> }
> @@ -1324,11 +1324,11 @@ package org.apache.flex.core
> if (value is String)
> {
> s = String(value);
> - if (s.indexOf("%") != -1)
> + if (s.indexOf("%") !== -1)
> _percentHeight = Number(s.substring(0, s.length - 1));
> else
> {
> - if (s.indexOf("px") != -1)
> + if (s.indexOf("px") !== -1)
> s = s.substring(0, s.length - 2);
> _height = _explicitHeight = Number(s);
> }
> @@ -1341,30 +1341,30 @@ package org.apache.flex.core
> for each (var bead:IBead in beads)
> addBead(bead);
>
> - if (getBeadByType(IBeadModel) == null)
> + if (getBeadByType(IBeadModel) === null)
> {
> c = ValuesManager.valuesImpl.getValue(this, "iBeadModel") as Class;
> - if (c)
> + if (c !== undefined)
> {
> var model:IBeadModel = new c as IBeadModel;
> if (model)
> addBead(model);
> }
> }
> - if (_view == null && getBeadByType(IBeadView) == null)
> + if (_view === null && getBeadByType(IBeadView) === null)
> {
> c = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
> - if (c)
> + if (c !== undefined)
> {
> var view:IBeadView = new c as IBeadView;
> if (view)
> addBead(view);
> }
> }
> - if (getBeadByType(IBeadController) == null)
> + if (getBeadByType(IBeadController) === null)
> {
> c = ValuesManager.valuesImpl.getValue(this, "iBeadController") as Class;
> - if (c)
> + if (c !== undefined)
> {
> var controller:IBeadController = new c as IBeadController;
> if (controller)
> @@ -1385,7 +1385,7 @@ package org.apache.flex.core
> public function get measurementBead() : IMeasurementBead
> {
> var measurementBead:IMeasurementBead = getBeadByType(IMeasurementBead) as IMeasurementBead;
> - if( measurementBead == null ) {
> + if( measurementBead === null ) {
> addBead(measurementBead = new (ValuesManager.valuesImpl.getValue(this, "iMeasurementBead")) as IMeasurementBead);
> }
>
> @@ -1409,7 +1409,7 @@ package org.apache.flex.core
> {
> COMPILE::SWF
> {
> - if (!_stageProxy)
> + if (_stageProxy === null)
> {
> _stageProxy = new StageProxy(stage);
> _stageProxy.addEventListener("removedFromStage", stageProxy_removedFromStageHandler);
> @@ -1466,9 +1466,9 @@ package org.apache.flex.core
> COMPILE::JS
> protected function createElement():WrappedHTMLElement
> {
> - if (element == null)
> + if (element === null)
> element = document.createElement('div') as WrappedHTMLElement;
> - if (positioner == null)
> + if (positioner === null)
> positioner = element;
> positioner.style.display = 'block';
> //positioner.style.position = 'relative';
>
[3/7] git commit: [flex-asjs] [refs/heads/develop] - use === and !==
where needed
Posted by jm...@apache.org.
use === and !== where needed
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4eb2f8b1
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4eb2f8b1
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4eb2f8b1
Branch: refs/heads/develop
Commit: 4eb2f8b168e4857b33163a36d8e98b56550fc39c
Parents: 282125c
Author: Justin Mclean <jm...@apache.org>
Authored: Fri Jun 2 19:48:19 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Fri Jun 2 19:48:19 2017 +1000
----------------------------------------------------------------------
.../main/flex/org/apache/flex/core/UIBase.as | 80 ++++++++++----------
1 file changed, 40 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4eb2f8b1/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 04615c3..e242fd6 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
@@ -202,7 +202,7 @@ package org.apache.flex.core
*/
public function set explicitWidth(value:Number):void
{
- if (_explicitWidth == value)
+ if (_explicitWidth === value)
return;
// width can be pixel or percent not both
@@ -235,7 +235,7 @@ package org.apache.flex.core
*/
public function set explicitHeight(value:Number):void
{
- if (_explicitHeight == value)
+ if (_explicitHeight === value)
return;
// height can be pixel or percent not both
@@ -272,7 +272,7 @@ package org.apache.flex.core
public function set percentWidth(value:Number):void
{
COMPILE::SWF {
- if (_percentWidth == value)
+ if (_percentWidth === value)
return;
if (!isNaN(value))
@@ -315,7 +315,7 @@ package org.apache.flex.core
public function set percentHeight(value:Number):void
{
COMPILE::SWF {
- if (_percentHeight == value)
+ if (_percentHeight === value)
return;
if (!isNaN(value))
@@ -369,7 +369,7 @@ package org.apache.flex.core
{
var pixels:Number;
var strpixels:String = positioner.style.width as String;
- if (strpixels !== null && strpixels.indexOf('%') != -1)
+ if (strpixels !== null && strpixels.indexOf('%') !== -1)
pixels = NaN;
else
pixels = parseFloat(strpixels);
@@ -389,7 +389,7 @@ package org.apache.flex.core
COMPILE::SWF
override public function set width(value:Number):void
{
- if (explicitWidth != value)
+ if (explicitWidth !== value)
{
explicitWidth = value;
}
@@ -403,7 +403,7 @@ package org.apache.flex.core
COMPILE::JS
public function set width(value:Number):void
{
- if (explicitWidth != value)
+ if (explicitWidth !== value)
{
explicitWidth = value;
}
@@ -461,7 +461,7 @@ package org.apache.flex.core
{
var pixels:Number;
var strpixels:String = positioner.style.height as String;
- if (strpixels !== null && strpixels.indexOf('%') != -1)
+ if (strpixels !== null && strpixels.indexOf('%') !== -1)
pixels = NaN;
else
pixels = parseFloat(strpixels);
@@ -481,7 +481,7 @@ package org.apache.flex.core
COMPILE::SWF
override public function set height(value:Number):void
{
- if (explicitHeight != value)
+ if (explicitHeight !== value)
{
explicitHeight = value;
}
@@ -495,7 +495,7 @@ package org.apache.flex.core
COMPILE::JS
public function set height(value:Number):void
{
- if (explicitHeight != value)
+ if (explicitHeight !== value)
{
explicitHeight = value;
}
@@ -528,7 +528,7 @@ package org.apache.flex.core
*/
public function setHeight(value:Number, noEvent:Boolean = false):void
{
- if (_height != value)
+ if (_height !== value)
{
_height = value;
COMPILE::JS
@@ -550,7 +550,7 @@ package org.apache.flex.core
*/
public function setWidth(value:Number, noEvent:Boolean = false):void
{
- if (_width != value)
+ if (_width !== value)
{
_width = value;
COMPILE::JS
@@ -572,7 +572,7 @@ package org.apache.flex.core
*/
public function setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void
{
- if (_width != newWidth)
+ if (_width !== newWidth)
{
_width = newWidth;
COMPILE::JS
@@ -582,7 +582,7 @@ package org.apache.flex.core
if (!noEvent)
dispatchEvent(new Event("widthChanged"));
}
- if (_height != newHeight)
+ if (_height !== newHeight)
{
_height = newHeight;
COMPILE::JS
@@ -799,7 +799,7 @@ package org.apache.flex.core
}
else
{
- if (displayStyleForLayout != null)
+ if (displayStyleForLayout !== null)
positioner.style.display = displayStyleForLayout;
dispatchEvent(new Event('show'));
}
@@ -831,7 +831,7 @@ package org.apache.flex.core
COMPILE::SWF
public function get model():Object
{
- if (_model == null)
+ if (_model === null)
{
// addbead will set _model
addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBead);
@@ -845,7 +845,7 @@ package org.apache.flex.core
COMPILE::SWF
public function set model(value:Object):void
{
- if (_model != value)
+ if (_model !== value)
{
addBead(value as IBead);
dispatchEvent(new Event("modelChanged"));
@@ -865,10 +865,10 @@ package org.apache.flex.core
*/
public function get view():IBeadView
{
- if (_view == null)
+ if (_view === null)
{
var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
- if (c)
+ if (c !== undefined)
{
_view = (new c()) as IBeadView;
addBead(_view);
@@ -882,7 +882,7 @@ package org.apache.flex.core
*/
public function set view(value:IBeadView):void
{
- if (_view != value)
+ if (_view !== value)
{
addBead(value as IBead);
dispatchEvent(new Event("viewChanged"));
@@ -909,7 +909,7 @@ package org.apache.flex.core
*/
public function set id(value:String):void
{
- if (_id != value)
+ if (_id !== value)
{
_id = value;
dispatchEvent(new Event("idChanged"));
@@ -945,7 +945,7 @@ package org.apache.flex.core
*/
public function set style(value:Object):void
{
- if (_style != value)
+ if (_style !== value)
{
if (value is String)
{
@@ -993,7 +993,7 @@ package org.apache.flex.core
*/
public function set className(value:String):void
{
- if (_className != value)
+ if (_className !== value)
{
COMPILE::JS
{
@@ -1095,7 +1095,7 @@ package org.apache.flex.core
for (var i:int = 0; i < n; i++)
{
var bead:IBead = _beads[i];
- if (bead == value)
+ if (bead === value)
{
_beads.splice(i, 1);
return bead;
@@ -1190,7 +1190,7 @@ package org.apache.flex.core
COMPILE::JS
{
var children:Array = internalChildren();
- if (children.length == 0)
+ if (children.length === 0)
{
return null;
}
@@ -1221,7 +1221,7 @@ package org.apache.flex.core
var n:int = children.length;
for (var i:int = 0; i < n; i++)
{
- if (children[i] == c.element)
+ if (children[i] === c.element)
return i;
}
return -1;
@@ -1302,11 +1302,11 @@ package org.apache.flex.core
if (value is String)
{
var s:String = String(value);
- if (s.indexOf("%") != -1)
+ if (s.indexOf("%") !== -1)
_percentWidth = Number(s.substring(0, s.length - 1));
else
{
- if (s.indexOf("px") != -1)
+ if (s.indexOf("px") !== -1)
s = s.substring(0, s.length - 2);
_width = _explicitWidth = Number(s);
}
@@ -1324,11 +1324,11 @@ package org.apache.flex.core
if (value is String)
{
s = String(value);
- if (s.indexOf("%") != -1)
+ if (s.indexOf("%") !== -1)
_percentHeight = Number(s.substring(0, s.length - 1));
else
{
- if (s.indexOf("px") != -1)
+ if (s.indexOf("px") !== -1)
s = s.substring(0, s.length - 2);
_height = _explicitHeight = Number(s);
}
@@ -1341,30 +1341,30 @@ package org.apache.flex.core
for each (var bead:IBead in beads)
addBead(bead);
- if (getBeadByType(IBeadModel) == null)
+ if (getBeadByType(IBeadModel) === null)
{
c = ValuesManager.valuesImpl.getValue(this, "iBeadModel") as Class;
- if (c)
+ if (c !== undefined)
{
var model:IBeadModel = new c as IBeadModel;
if (model)
addBead(model);
}
}
- if (_view == null && getBeadByType(IBeadView) == null)
+ if (_view === null && getBeadByType(IBeadView) === null)
{
c = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
- if (c)
+ if (c !== undefined)
{
var view:IBeadView = new c as IBeadView;
if (view)
addBead(view);
}
}
- if (getBeadByType(IBeadController) == null)
+ if (getBeadByType(IBeadController) === null)
{
c = ValuesManager.valuesImpl.getValue(this, "iBeadController") as Class;
- if (c)
+ if (c !== undefined)
{
var controller:IBeadController = new c as IBeadController;
if (controller)
@@ -1385,7 +1385,7 @@ package org.apache.flex.core
public function get measurementBead() : IMeasurementBead
{
var measurementBead:IMeasurementBead = getBeadByType(IMeasurementBead) as IMeasurementBead;
- if( measurementBead == null ) {
+ if( measurementBead === null ) {
addBead(measurementBead = new (ValuesManager.valuesImpl.getValue(this, "iMeasurementBead")) as IMeasurementBead);
}
@@ -1409,7 +1409,7 @@ package org.apache.flex.core
{
COMPILE::SWF
{
- if (!_stageProxy)
+ if (_stageProxy === null)
{
_stageProxy = new StageProxy(stage);
_stageProxy.addEventListener("removedFromStage", stageProxy_removedFromStageHandler);
@@ -1466,9 +1466,9 @@ package org.apache.flex.core
COMPILE::JS
protected function createElement():WrappedHTMLElement
{
- if (element == null)
+ if (element === null)
element = document.createElement('div') as WrappedHTMLElement;
- if (positioner == null)
+ if (positioner === null)
positioner = element;
positioner.style.display = 'block';
//positioner.style.position = 'relative';
[5/7] git commit: [flex-asjs] [refs/heads/develop] - as returns null
rather than undefined
Posted by jm...@apache.org.
as returns null rather than undefined
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/256dcd71
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/256dcd71
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/256dcd71
Branch: refs/heads/develop
Commit: 256dcd71c4fce9168c5c07e88d3e72a11239d2ce
Parents: 6fef880
Author: Justin Mclean <jm...@apache.org>
Authored: Sat Jun 3 10:41:36 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Sat Jun 3 10:41:36 2017 +1000
----------------------------------------------------------------------
.../Basic/src/main/flex/org/apache/flex/core/UIBase.as | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/256dcd71/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 e242fd6..e524bc3 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
@@ -868,7 +868,7 @@ package org.apache.flex.core
if (_view === null)
{
var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
- if (c !== undefined)
+ if (c !== null)
{
_view = (new c()) as IBeadView;
addBead(_view);
@@ -1344,7 +1344,7 @@ package org.apache.flex.core
if (getBeadByType(IBeadModel) === null)
{
c = ValuesManager.valuesImpl.getValue(this, "iBeadModel") as Class;
- if (c !== undefined)
+ if (c !== null)
{
var model:IBeadModel = new c as IBeadModel;
if (model)
@@ -1354,7 +1354,7 @@ package org.apache.flex.core
if (_view === null && getBeadByType(IBeadView) === null)
{
c = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
- if (c !== undefined)
+ if (c !== null)
{
var view:IBeadView = new c as IBeadView;
if (view)
@@ -1364,7 +1364,7 @@ package org.apache.flex.core
if (getBeadByType(IBeadController) === null)
{
c = ValuesManager.valuesImpl.getValue(this, "iBeadController") as Class;
- if (c !== undefined)
+ if (c !== null)
{
var controller:IBeadController = new c as IBeadController;
if (controller)
[6/7] git commit: [flex-asjs] [refs/heads/develop] - temporary fix
for null/unresolved issues between AS/JS
Posted by jm...@apache.org.
temporary fix for null/unresolved 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/2af9ded8
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/2af9ded8
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/2af9ded8
Branch: refs/heads/develop
Commit: 2af9ded85cb047c3b74407bd381fd8187eba7ed8
Parents: 256dcd7
Author: Justin Mclean <jm...@apache.org>
Authored: Sat Jun 3 11:42:30 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Sat Jun 3 11:42:30 2017 +1000
----------------------------------------------------------------------
.../main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2af9ded8/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
index a4e4e1d..5e3a6c4 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
@@ -336,7 +336,8 @@ package org.apache.flex.core
if (thisObject is IStyleableObject)
{
var styleable:IStyleableObject = IStyleableObject(thisObject);
- if (styleable.style !== undefined)
+ // undefined in JS null in AS
+ if (styleable.style != null)
{
value = styleable.style[valueName];
if (value === INHERIT)
@@ -344,7 +345,8 @@ package org.apache.flex.core
if (value !== undefined)
return value;
}
- if (styleable.id !== undefined)
+ // undefined in JS null in AS
+ if (styleable.id != null)
{
o = values["#" + styleable.id];
if (o !== undefined)
@@ -357,7 +359,8 @@ package org.apache.flex.core
}
}
var classNames:String = styleable.className;
- if (classNames !== undefined)
+ // undefined in JS null in AS
+ if (classNames != null)
{
var classNameList:Array = classNames.split(" ");
for each (className in classNameList)
[4/7] git commit: [flex-asjs] [refs/heads/develop] - Merge branch
'develop' of https://git-wip-us.apache.org/repos/asf/flex-asjs into develop
Posted by jm...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/flex-asjs into develop
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/6fef8802
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6fef8802
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6fef8802
Branch: refs/heads/develop
Commit: 6fef8802fddde60abd7e848d3c26d3829adf16de
Parents: 4eb2f8b f730c0c
Author: Justin Mclean <jm...@apache.org>
Authored: Sat Jun 3 08:52:48 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Sat Jun 3 08:52:48 2017 +1000
----------------------------------------------------------------------
examples/flexjs/DataBindingExampleWithFlexLayout/pom.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
[7/7] git commit: [flex-asjs] [refs/heads/develop] - temporary fix
for null/undefined issues between AS/JS
Posted by jm...@apache.org.
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)
[2/7] git commit: [flex-asjs] [refs/heads/develop] - no need to check
c twice
Posted by jm...@apache.org.
no need to check c twice
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/282125cc
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/282125cc
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/282125cc
Branch: refs/heads/develop
Commit: 282125cc3d9159b115b06e1e885c76cea4d0bd70
Parents: ae3fbe3
Author: Justin Mclean <jm...@apache.org>
Authored: Fri Jun 2 14:25:51 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Fri Jun 2 14:25:51 2017 +1000
----------------------------------------------------------------------
.../Basic/src/main/flex/org/apache/flex/core/UIBase.as | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/282125cc/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 94cfef5..04615c3 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
@@ -870,11 +870,8 @@ package org.apache.flex.core
var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
if (c)
{
- if (c)
- {
- _view = (new c()) as IBeadView;
- addBead(_view);
- }
+ _view = (new c()) as IBeadView;
+ addBead(_view);
}
}
return _view;