You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2014/10/24 13:28:58 UTC

[3/3] git commit: [flex-sdk] [refs/heads/develop] - Increment and counterpart don't work with FlexJS '_get()' and '_set()'

Increment and counterpart don't work with FlexJS '_get()' and '_set()'

In FlexJS, all properties are converted to a set of methods, with '_get' and '_set' postfix. Calling an increment on a property in AS - myProp++ - will thus translate to 'myProp_get()++' in JS. And JS strongly objects to that syntax.

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: af2dc0d8f6712c0003264cea966ef8afd159878c
Parents: b9d15cf
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Oct 24 13:04:09 2014 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Oct 24 13:04:19 2014 +0200

----------------------------------------------------------------------
 .../projects/framework/src/mx/managers/SystemManager.as   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/af2dc0d8/frameworks/projects/framework/src/mx/managers/SystemManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/managers/SystemManager.as b/frameworks/projects/framework/src/mx/managers/SystemManager.as
index 61d41ce..9eb9bea 100644
--- a/frameworks/projects/framework/src/mx/managers/SystemManager.as
+++ b/frameworks/projects/framework/src/mx/managers/SystemManager.as
@@ -1752,7 +1752,7 @@ public class SystemManager extends MovieClip
     {
         // Adjust the partition indexes before the 
         // "added" event is dispatched.
-        noTopMostIndex++;
+        noTopMostIndex = noTopMostIndex + 1;
 
         var oldParent:DisplayObjectContainer = child.parent;
         if (oldParent)
@@ -1790,7 +1790,7 @@ public class SystemManager extends MovieClip
     {
         // Adjust the partition indexes
         // before the "removed" event is dispatched.
-        noTopMostIndex--;
+        noTopMostIndex = noTopMostIndex - 1;
 
         return rawChildren_removeChild(child);
     }
@@ -1802,7 +1802,7 @@ public class SystemManager extends MovieClip
     {
         // Adjust the partition indexes
         // before the "removed" event is dispatched.
-        noTopMostIndex--;
+        noTopMostIndex = noTopMostIndex - 1;
 
         return rawChildren_removeChildAt(applicationIndex + index);
     }
@@ -2658,7 +2658,7 @@ public class SystemManager extends MovieClip
         mouseCatcher.name = "mouseCatcher";
         // Must use addChildAt because a creationComplete handler can create a
         // dialog and insert it at 0.
-        noTopMostIndex++;
+        noTopMostIndex = noTopMostIndex + 1;
         super.addChildAt(mouseCatcher, 0);  
         resizeMouseCatcher();
         if (!topLevel)
@@ -2668,7 +2668,7 @@ public class SystemManager extends MovieClip
         }
 
         // Add the application as child 1.
-        noTopMostIndex++;
+        noTopMostIndex = noTopMostIndex + 1;
         super.addChildAt(DisplayObject(app), 1);
 
         CONFIG::performanceInstrumentation


Re: [3/3] git commit: [flex-sdk] [refs/heads/develop] - Increment and counterpart don't work with FlexJS '_get()' and '_set()'

Posted by Erik de Bruin <er...@ixsoftware.nl>.
It’s not on my list.

For VF2JS I’ll be using the more modern (but not backwards compatible)
approach of “Object.defineProperty” to create a ‘real’ properties with
‘get’ and ‘set’ methods. That will bring JS up to speed with AS and will
prevent this (and many other) types of incompatibilities when cross
compiling.

EdB



On Fri, Oct 24, 2014 at 6:45 PM, Alex Harui <ah...@adobe.com> wrote:

> Is the plan to fix this in FalconJX so these kinds of changes aren’t
> necessary?
>
> -Alex
>
> On 10/24/14, 4:28 AM, "erikdebruin@apache.org" <er...@apache.org>
> wrote:
>
> >Increment and counterpart don't work with FlexJS '_get()' and '_set()'
> >
> >In FlexJS, all properties are converted to a set of methods, with '_get'
> >and '_set' postfix. Calling an increment on a property in AS - myProp++ -
> >will thus translate to 'myProp_get()++' in JS. And JS strongly objects to
> >that syntax.
> >
> >Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
> >
> >
> >Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
> >Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/af2dc0d8
> >Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/af2dc0d8
> >Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/af2dc0d8
> >
> >Branch: refs/heads/develop
> >Commit: af2dc0d8f6712c0003264cea966ef8afd159878c
> >Parents: b9d15cf
> >Author: Erik de Bruin <er...@ixsoftware.nl>
> >Authored: Fri Oct 24 13:04:09 2014 +0200
> >Committer: Erik de Bruin <er...@ixsoftware.nl>
> >Committed: Fri Oct 24 13:04:19 2014 +0200
> >
> >----------------------------------------------------------------------
> > .../projects/framework/src/mx/managers/SystemManager.as   | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >----------------------------------------------------------------------
> >
> >
> >
> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/af2dc0d8/frameworks/p
> >rojects/framework/src/mx/managers/SystemManager.as
> >----------------------------------------------------------------------
> >diff --git
> >a/frameworks/projects/framework/src/mx/managers/SystemManager.as
> >b/frameworks/projects/framework/src/mx/managers/SystemManager.as
> >index 61d41ce..9eb9bea 100644
> >--- a/frameworks/projects/framework/src/mx/managers/SystemManager.as
> >+++ b/frameworks/projects/framework/src/mx/managers/SystemManager.as
> >@@ -1752,7 +1752,7 @@ public class SystemManager extends MovieClip
> >     {
> >         // Adjust the partition indexes before the
> >         // "added" event is dispatched.
> >-        noTopMostIndex++;
> >+        noTopMostIndex = noTopMostIndex + 1;
> >
> >         var oldParent:DisplayObjectContainer = child.parent;
> >         if (oldParent)
> >@@ -1790,7 +1790,7 @@ public class SystemManager extends MovieClip
> >     {
> >         // Adjust the partition indexes
> >         // before the "removed" event is dispatched.
> >-        noTopMostIndex--;
> >+        noTopMostIndex = noTopMostIndex - 1;
> >
> >         return rawChildren_removeChild(child);
> >     }
> >@@ -1802,7 +1802,7 @@ public class SystemManager extends MovieClip
> >     {
> >         // Adjust the partition indexes
> >         // before the "removed" event is dispatched.
> >-        noTopMostIndex--;
> >+        noTopMostIndex = noTopMostIndex - 1;
> >
> >         return rawChildren_removeChildAt(applicationIndex + index);
> >     }
> >@@ -2658,7 +2658,7 @@ public class SystemManager extends MovieClip
> >         mouseCatcher.name = "mouseCatcher";
> >         // Must use addChildAt because a creationComplete handler can
> >create a
> >         // dialog and insert it at 0.
> >-        noTopMostIndex++;
> >+        noTopMostIndex = noTopMostIndex + 1;
> >         super.addChildAt(mouseCatcher, 0);
> >         resizeMouseCatcher();
> >         if (!topLevel)
> >@@ -2668,7 +2668,7 @@ public class SystemManager extends MovieClip
> >         }
> >
> >         // Add the application as child 1.
> >-        noTopMostIndex++;
> >+        noTopMostIndex = noTopMostIndex + 1;
> >         super.addChildAt(DisplayObject(app), 1);
> >
> >         CONFIG::performanceInstrumentation
> >
>
>


-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [3/3] git commit: [flex-sdk] [refs/heads/develop] - Increment and counterpart don't work with FlexJS '_get()' and '_set()'

Posted by Erik de Bruin <er...@ixsoftware.nl>.
It’s not on my list.

For VF2JS I’ll be using the more modern (but not backwards compatible)
approach of “Object.defineProperty” to create a ‘real’ properties with
‘get’ and ‘set’ methods. That will bring JS up to speed with AS and will
prevent this (and many other) types of incompatibilities when cross
compiling.

EdB



On Fri, Oct 24, 2014 at 6:45 PM, Alex Harui <ah...@adobe.com> wrote:

> Is the plan to fix this in FalconJX so these kinds of changes aren’t
> necessary?
>
> -Alex
>
> On 10/24/14, 4:28 AM, "erikdebruin@apache.org" <er...@apache.org>
> wrote:
>
> >Increment and counterpart don't work with FlexJS '_get()' and '_set()'
> >
> >In FlexJS, all properties are converted to a set of methods, with '_get'
> >and '_set' postfix. Calling an increment on a property in AS - myProp++ -
> >will thus translate to 'myProp_get()++' in JS. And JS strongly objects to
> >that syntax.
> >
> >Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
> >
> >
> >Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
> >Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/af2dc0d8
> >Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/af2dc0d8
> >Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/af2dc0d8
> >
> >Branch: refs/heads/develop
> >Commit: af2dc0d8f6712c0003264cea966ef8afd159878c
> >Parents: b9d15cf
> >Author: Erik de Bruin <er...@ixsoftware.nl>
> >Authored: Fri Oct 24 13:04:09 2014 +0200
> >Committer: Erik de Bruin <er...@ixsoftware.nl>
> >Committed: Fri Oct 24 13:04:19 2014 +0200
> >
> >----------------------------------------------------------------------
> > .../projects/framework/src/mx/managers/SystemManager.as   | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >----------------------------------------------------------------------
> >
> >
> >
> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/af2dc0d8/frameworks/p
> >rojects/framework/src/mx/managers/SystemManager.as
> >----------------------------------------------------------------------
> >diff --git
> >a/frameworks/projects/framework/src/mx/managers/SystemManager.as
> >b/frameworks/projects/framework/src/mx/managers/SystemManager.as
> >index 61d41ce..9eb9bea 100644
> >--- a/frameworks/projects/framework/src/mx/managers/SystemManager.as
> >+++ b/frameworks/projects/framework/src/mx/managers/SystemManager.as
> >@@ -1752,7 +1752,7 @@ public class SystemManager extends MovieClip
> >     {
> >         // Adjust the partition indexes before the
> >         // "added" event is dispatched.
> >-        noTopMostIndex++;
> >+        noTopMostIndex = noTopMostIndex + 1;
> >
> >         var oldParent:DisplayObjectContainer = child.parent;
> >         if (oldParent)
> >@@ -1790,7 +1790,7 @@ public class SystemManager extends MovieClip
> >     {
> >         // Adjust the partition indexes
> >         // before the "removed" event is dispatched.
> >-        noTopMostIndex--;
> >+        noTopMostIndex = noTopMostIndex - 1;
> >
> >         return rawChildren_removeChild(child);
> >     }
> >@@ -1802,7 +1802,7 @@ public class SystemManager extends MovieClip
> >     {
> >         // Adjust the partition indexes
> >         // before the "removed" event is dispatched.
> >-        noTopMostIndex--;
> >+        noTopMostIndex = noTopMostIndex - 1;
> >
> >         return rawChildren_removeChildAt(applicationIndex + index);
> >     }
> >@@ -2658,7 +2658,7 @@ public class SystemManager extends MovieClip
> >         mouseCatcher.name = "mouseCatcher";
> >         // Must use addChildAt because a creationComplete handler can
> >create a
> >         // dialog and insert it at 0.
> >-        noTopMostIndex++;
> >+        noTopMostIndex = noTopMostIndex + 1;
> >         super.addChildAt(mouseCatcher, 0);
> >         resizeMouseCatcher();
> >         if (!topLevel)
> >@@ -2668,7 +2668,7 @@ public class SystemManager extends MovieClip
> >         }
> >
> >         // Add the application as child 1.
> >-        noTopMostIndex++;
> >+        noTopMostIndex = noTopMostIndex + 1;
> >         super.addChildAt(DisplayObject(app), 1);
> >
> >         CONFIG::performanceInstrumentation
> >
>
>


-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [3/3] git commit: [flex-sdk] [refs/heads/develop] - Increment and counterpart don't work with FlexJS '_get()' and '_set()'

Posted by Alex Harui <ah...@adobe.com>.
Is the plan to fix this in FalconJX so these kinds of changes aren’t
necessary?

-Alex

On 10/24/14, 4:28 AM, "erikdebruin@apache.org" <er...@apache.org>
wrote:

>Increment and counterpart don't work with FlexJS '_get()' and '_set()'
>
>In FlexJS, all properties are converted to a set of methods, with '_get'
>and '_set' postfix. Calling an increment on a property in AS - myProp++ -
>will thus translate to 'myProp_get()++' in JS. And JS strongly objects to
>that syntax.
>
>Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
>
>
>Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
>Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/af2dc0d8
>Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/af2dc0d8
>Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/af2dc0d8
>
>Branch: refs/heads/develop
>Commit: af2dc0d8f6712c0003264cea966ef8afd159878c
>Parents: b9d15cf
>Author: Erik de Bruin <er...@ixsoftware.nl>
>Authored: Fri Oct 24 13:04:09 2014 +0200
>Committer: Erik de Bruin <er...@ixsoftware.nl>
>Committed: Fri Oct 24 13:04:19 2014 +0200
>
>----------------------------------------------------------------------
> .../projects/framework/src/mx/managers/SystemManager.as   | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>----------------------------------------------------------------------
>
>
>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/af2dc0d8/frameworks/p
>rojects/framework/src/mx/managers/SystemManager.as
>----------------------------------------------------------------------
>diff --git 
>a/frameworks/projects/framework/src/mx/managers/SystemManager.as
>b/frameworks/projects/framework/src/mx/managers/SystemManager.as
>index 61d41ce..9eb9bea 100644
>--- a/frameworks/projects/framework/src/mx/managers/SystemManager.as
>+++ b/frameworks/projects/framework/src/mx/managers/SystemManager.as
>@@ -1752,7 +1752,7 @@ public class SystemManager extends MovieClip
>     {
>         // Adjust the partition indexes before the
>         // "added" event is dispatched.
>-        noTopMostIndex++;
>+        noTopMostIndex = noTopMostIndex + 1;
> 
>         var oldParent:DisplayObjectContainer = child.parent;
>         if (oldParent)
>@@ -1790,7 +1790,7 @@ public class SystemManager extends MovieClip
>     {
>         // Adjust the partition indexes
>         // before the "removed" event is dispatched.
>-        noTopMostIndex--;
>+        noTopMostIndex = noTopMostIndex - 1;
> 
>         return rawChildren_removeChild(child);
>     }
>@@ -1802,7 +1802,7 @@ public class SystemManager extends MovieClip
>     {
>         // Adjust the partition indexes
>         // before the "removed" event is dispatched.
>-        noTopMostIndex--;
>+        noTopMostIndex = noTopMostIndex - 1;
> 
>         return rawChildren_removeChildAt(applicationIndex + index);
>     }
>@@ -2658,7 +2658,7 @@ public class SystemManager extends MovieClip
>         mouseCatcher.name = "mouseCatcher";
>         // Must use addChildAt because a creationComplete handler can
>create a
>         // dialog and insert it at 0.
>-        noTopMostIndex++;
>+        noTopMostIndex = noTopMostIndex + 1;
>         super.addChildAt(mouseCatcher, 0);
>         resizeMouseCatcher();
>         if (!topLevel)
>@@ -2668,7 +2668,7 @@ public class SystemManager extends MovieClip
>         }
> 
>         // Add the application as child 1.
>-        noTopMostIndex++;
>+        noTopMostIndex = noTopMostIndex + 1;
>         super.addChildAt(DisplayObject(app), 1);
> 
>         CONFIG::performanceInstrumentation
>


Re: [3/3] git commit: [flex-sdk] [refs/heads/develop] - Increment and counterpart don't work with FlexJS '_get()' and '_set()'

Posted by Alex Harui <ah...@adobe.com>.
Is the plan to fix this in FalconJX so these kinds of changes aren’t
necessary?

-Alex

On 10/24/14, 4:28 AM, "erikdebruin@apache.org" <er...@apache.org>
wrote:

>Increment and counterpart don't work with FlexJS '_get()' and '_set()'
>
>In FlexJS, all properties are converted to a set of methods, with '_get'
>and '_set' postfix. Calling an increment on a property in AS - myProp++ -
>will thus translate to 'myProp_get()++' in JS. And JS strongly objects to
>that syntax.
>
>Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
>
>
>Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
>Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/af2dc0d8
>Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/af2dc0d8
>Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/af2dc0d8
>
>Branch: refs/heads/develop
>Commit: af2dc0d8f6712c0003264cea966ef8afd159878c
>Parents: b9d15cf
>Author: Erik de Bruin <er...@ixsoftware.nl>
>Authored: Fri Oct 24 13:04:09 2014 +0200
>Committer: Erik de Bruin <er...@ixsoftware.nl>
>Committed: Fri Oct 24 13:04:19 2014 +0200
>
>----------------------------------------------------------------------
> .../projects/framework/src/mx/managers/SystemManager.as   | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>----------------------------------------------------------------------
>
>
>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/af2dc0d8/frameworks/p
>rojects/framework/src/mx/managers/SystemManager.as
>----------------------------------------------------------------------
>diff --git 
>a/frameworks/projects/framework/src/mx/managers/SystemManager.as
>b/frameworks/projects/framework/src/mx/managers/SystemManager.as
>index 61d41ce..9eb9bea 100644
>--- a/frameworks/projects/framework/src/mx/managers/SystemManager.as
>+++ b/frameworks/projects/framework/src/mx/managers/SystemManager.as
>@@ -1752,7 +1752,7 @@ public class SystemManager extends MovieClip
>     {
>         // Adjust the partition indexes before the
>         // "added" event is dispatched.
>-        noTopMostIndex++;
>+        noTopMostIndex = noTopMostIndex + 1;
> 
>         var oldParent:DisplayObjectContainer = child.parent;
>         if (oldParent)
>@@ -1790,7 +1790,7 @@ public class SystemManager extends MovieClip
>     {
>         // Adjust the partition indexes
>         // before the "removed" event is dispatched.
>-        noTopMostIndex--;
>+        noTopMostIndex = noTopMostIndex - 1;
> 
>         return rawChildren_removeChild(child);
>     }
>@@ -1802,7 +1802,7 @@ public class SystemManager extends MovieClip
>     {
>         // Adjust the partition indexes
>         // before the "removed" event is dispatched.
>-        noTopMostIndex--;
>+        noTopMostIndex = noTopMostIndex - 1;
> 
>         return rawChildren_removeChildAt(applicationIndex + index);
>     }
>@@ -2658,7 +2658,7 @@ public class SystemManager extends MovieClip
>         mouseCatcher.name = "mouseCatcher";
>         // Must use addChildAt because a creationComplete handler can
>create a
>         // dialog and insert it at 0.
>-        noTopMostIndex++;
>+        noTopMostIndex = noTopMostIndex + 1;
>         super.addChildAt(mouseCatcher, 0);
>         resizeMouseCatcher();
>         if (!topLevel)
>@@ -2668,7 +2668,7 @@ public class SystemManager extends MovieClip
>         }
> 
>         // Add the application as child 1.
>-        noTopMostIndex++;
>+        noTopMostIndex = noTopMostIndex + 1;
>         super.addChildAt(DisplayObject(app), 1);
> 
>         CONFIG::performanceInstrumentation
>