You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Alex Harui <ah...@adobe.com> on 2013/11/04 23:47:07 UTC

Re: git commit: [flex-sdk] [refs/heads/develop] - FLEX-33875 check to stop RTE

Hi Justin,

I've been told that ("foo" in bar) is slow.  Is this going to get called a
lot?  And why does a skin not have a hostcomponent property?  I thought
that was part of the contract.

-Alex

On 11/4/13 1:56 PM, "jmclean@apache.org" <jm...@apache.org> wrote:

>Updated Branches:
>  refs/heads/develop 7cab71bb2 -> 1199cca6d
>
>
>FLEX-33875 check to stop RTE
>
>
>Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
>Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/1199cca6
>Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/1199cca6
>Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/1199cca6
>
>Branch: refs/heads/develop
>Commit: 1199cca6ddb6fce742a136c596d5f285eafcd35f
>Parents: 7cab71b
>Author: Justin Mclean <jm...@apache.org>
>Authored: Tue Nov 5 08:55:16 2013 +1100
>Committer: Justin Mclean <jm...@apache.org>
>Committed: Tue Nov 5 08:55:16 2013 +1100
>
>----------------------------------------------------------------------
> .../projects/spark/src/spark/components/supportClasses/Skin.as     | 2 +-
> frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as  | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>----------------------------------------------------------------------
>
>
>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/1199cca6/frameworks/p
>rojects/spark/src/spark/components/supportClasses/Skin.as
>----------------------------------------------------------------------
>diff --git 
>a/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
>b/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
>index 6d1dfb3..9e106ae 100644
>--- 
>a/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
>+++ 
>b/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
>@@ -188,7 +188,7 @@ public class Skin extends Group implements
>IHighlightBitmapCaptureClient
>         var exclusions:Array = focusSkinExclusions;
>         if (!exclusions)
>         {
>-            if (this["hostComponent"] is SkinnableComponent)
>+            if ("hostComponent" in this && this["hostComponent"] is
>SkinnableComponent)
>                 exclusions =
>SkinnableComponent(this["hostComponent"]).suggestedFocusSkinExclusions;
>         }
>         var exclusionCount:Number = (exclusions == null) ? 0 :
>exclusions.length;
>
>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/1199cca6/frameworks/p
>rojects/spark/src/spark/skins/ActionScriptSkinBase.as
>----------------------------------------------------------------------
>diff --git 
>a/frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as
>b/frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as
>index 93a49ba..495312d 100644
>--- a/frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as
>+++ b/frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as
>@@ -799,7 +799,7 @@ public class ActionScriptSkinBase extends UIComponent
>implements IHighlightBitma
>         var exclusions:Array = focusSkinExclusions;
>         if (!exclusions)
>         {
>-            if (this["hostComponent"] is SkinnableComponent)
>+            if ("hostComponent" in this && this["hostComponent"] is
>SkinnableComponent)
>                 exclusions =
>SkinnableComponent(this["hostComponent"]).suggestedFocusSkinExclusions;
>         }
>         var exclusionCount:Number = (exclusions == null) ? 0 :
>exclusions.length;
>


Re: git commit: [flex-sdk] [refs/heads/develop] - FLEX-33875 check to stop RTE

Posted by Alex Harui <ah...@adobe.com>.

On 11/4/13 7:23 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:

>Hi,
>
>> I've been told that ("foo" in bar) is slow.  Is this going to get
>>called a
>> lot?  And why does a skin not have a hostcomponent property?  I thought
>> that was part of the contract.
>
>If you look at beginHighlightBitmapCapture it already does the same
>check, so seems to make sense to do the same in endHighlightBitmapCapture.
Ugh, didn't realize we were already using it.  And I guess this is focus
related so only two instances are involved at a time so it probably
doesn't matter.

-Alex


Re: git commit: [flex-sdk] [refs/heads/develop] - FLEX-33875 check to stop RTE

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> I've been told that ("foo" in bar) is slow.  Is this going to get called a
> lot?  And why does a skin not have a hostcomponent property?  I thought
> that was part of the contract.

If you look at beginHighlightBitmapCapture it already does the same check, so seems to make sense to do the same in endHighlightBitmapCapture.

Thanks,
Justin


RE: git commit: [flex-sdk] [refs/heads/develop] - FLEX-33875 check to stop RTE

Posted by Maurice Amsellem <ma...@systar.com>.
>And why does a skin not have a hostcomponent property?  I thought that was part of the contract.

I can answer to that one ;-)

Each subclass of MobileSkin will have a hostComponent property with a different type declaration.
If we declared hostComponent in MobileSkin, with let's say Object type, we will have to cast it all subclasses which makes the code less readable.
So that's why MobileSkin has to access hostComponent property dynamically.

Maurice
 
-----Message d'origine-----
De : Alex Harui [mailto:aharui@adobe.com] 
Envoyé : lundi 4 novembre 2013 23:47
À : dev@flex.apache.org; commits@flex.apache.org
Objet : Re: git commit: [flex-sdk] [refs/heads/develop] - FLEX-33875 check to stop RTE

Hi Justin,

I've been told that ("foo" in bar) is slow.  Is this going to get called a lot?  And why does a skin not have a hostcomponent property?  I thought that was part of the contract.

-Alex

On 11/4/13 1:56 PM, "jmclean@apache.org" <jm...@apache.org> wrote:

>Updated Branches:
>  refs/heads/develop 7cab71bb2 -> 1199cca6d
>
>
>FLEX-33875 check to stop RTE
>
>
>Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
>Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/1199cca6
>Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/1199cca6
>Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/1199cca6
>
>Branch: refs/heads/develop
>Commit: 1199cca6ddb6fce742a136c596d5f285eafcd35f
>Parents: 7cab71b
>Author: Justin Mclean <jm...@apache.org>
>Authored: Tue Nov 5 08:55:16 2013 +1100
>Committer: Justin Mclean <jm...@apache.org>
>Committed: Tue Nov 5 08:55:16 2013 +1100
>
>----------------------------------------------------------------------
> .../projects/spark/src/spark/components/supportClasses/Skin.as     | 2 +-
> frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as  | 2 
>+-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>----------------------------------------------------------------------
>
>
>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/1199cca6/framework
>s/p rojects/spark/src/spark/components/supportClasses/Skin.as
>----------------------------------------------------------------------
>diff --git
>a/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
>b/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
>index 6d1dfb3..9e106ae 100644
>---
>a/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
>+++ 
>b/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
>@@ -188,7 +188,7 @@ public class Skin extends Group implements 
>IHighlightBitmapCaptureClient
>         var exclusions:Array = focusSkinExclusions;
>         if (!exclusions)
>         {
>-            if (this["hostComponent"] is SkinnableComponent)
>+            if ("hostComponent" in this && this["hostComponent"] is
>SkinnableComponent)
>                 exclusions =
>SkinnableComponent(this["hostComponent"]).suggestedFocusSkinExclusions;
>         }
>         var exclusionCount:Number = (exclusions == null) ? 0 :
>exclusions.length;
>
>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/1199cca6/framework
>s/p rojects/spark/src/spark/skins/ActionScriptSkinBase.as
>----------------------------------------------------------------------
>diff --git
>a/frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as
>b/frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as
>index 93a49ba..495312d 100644
>--- a/frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as
>+++ b/frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as
>@@ -799,7 +799,7 @@ public class ActionScriptSkinBase extends 
>UIComponent implements IHighlightBitma
>         var exclusions:Array = focusSkinExclusions;
>         if (!exclusions)
>         {
>-            if (this["hostComponent"] is SkinnableComponent)
>+            if ("hostComponent" in this && this["hostComponent"] is
>SkinnableComponent)
>                 exclusions =
>SkinnableComponent(this["hostComponent"]).suggestedFocusSkinExclusions;
>         }
>         var exclusionCount:Number = (exclusions == null) ? 0 :
>exclusions.length;
>


RE: git commit: [flex-sdk] [refs/heads/develop] - FLEX-33875 check to stop RTE

Posted by Maurice Amsellem <ma...@systar.com>.
>And why does a skin not have a hostcomponent property?  I thought that was part of the contract.

I can answer to that one ;-)

Each subclass of MobileSkin will have a hostComponent property with a different type declaration.
If we declared hostComponent in MobileSkin, with let's say Object type, we will have to cast it all subclasses which makes the code less readable.
So that's why MobileSkin has to access hostComponent property dynamically.

Maurice
 
-----Message d'origine-----
De : Alex Harui [mailto:aharui@adobe.com] 
Envoyé : lundi 4 novembre 2013 23:47
À : dev@flex.apache.org; commits@flex.apache.org
Objet : Re: git commit: [flex-sdk] [refs/heads/develop] - FLEX-33875 check to stop RTE

Hi Justin,

I've been told that ("foo" in bar) is slow.  Is this going to get called a lot?  And why does a skin not have a hostcomponent property?  I thought that was part of the contract.

-Alex

On 11/4/13 1:56 PM, "jmclean@apache.org" <jm...@apache.org> wrote:

>Updated Branches:
>  refs/heads/develop 7cab71bb2 -> 1199cca6d
>
>
>FLEX-33875 check to stop RTE
>
>
>Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
>Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/1199cca6
>Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/1199cca6
>Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/1199cca6
>
>Branch: refs/heads/develop
>Commit: 1199cca6ddb6fce742a136c596d5f285eafcd35f
>Parents: 7cab71b
>Author: Justin Mclean <jm...@apache.org>
>Authored: Tue Nov 5 08:55:16 2013 +1100
>Committer: Justin Mclean <jm...@apache.org>
>Committed: Tue Nov 5 08:55:16 2013 +1100
>
>----------------------------------------------------------------------
> .../projects/spark/src/spark/components/supportClasses/Skin.as     | 2 +-
> frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as  | 2 
>+-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>----------------------------------------------------------------------
>
>
>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/1199cca6/framework
>s/p rojects/spark/src/spark/components/supportClasses/Skin.as
>----------------------------------------------------------------------
>diff --git
>a/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
>b/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
>index 6d1dfb3..9e106ae 100644
>---
>a/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
>+++ 
>b/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
>@@ -188,7 +188,7 @@ public class Skin extends Group implements 
>IHighlightBitmapCaptureClient
>         var exclusions:Array = focusSkinExclusions;
>         if (!exclusions)
>         {
>-            if (this["hostComponent"] is SkinnableComponent)
>+            if ("hostComponent" in this && this["hostComponent"] is
>SkinnableComponent)
>                 exclusions =
>SkinnableComponent(this["hostComponent"]).suggestedFocusSkinExclusions;
>         }
>         var exclusionCount:Number = (exclusions == null) ? 0 :
>exclusions.length;
>
>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/1199cca6/framework
>s/p rojects/spark/src/spark/skins/ActionScriptSkinBase.as
>----------------------------------------------------------------------
>diff --git
>a/frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as
>b/frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as
>index 93a49ba..495312d 100644
>--- a/frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as
>+++ b/frameworks/projects/spark/src/spark/skins/ActionScriptSkinBase.as
>@@ -799,7 +799,7 @@ public class ActionScriptSkinBase extends 
>UIComponent implements IHighlightBitma
>         var exclusions:Array = focusSkinExclusions;
>         if (!exclusions)
>         {
>-            if (this["hostComponent"] is SkinnableComponent)
>+            if ("hostComponent" in this && this["hostComponent"] is
>SkinnableComponent)
>                 exclusions =
>SkinnableComponent(this["hostComponent"]).suggestedFocusSkinExclusions;
>         }
>         var exclusionCount:Number = (exclusions == null) ? 0 :
>exclusions.length;
>