You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pi...@apache.org on 2019/10/21 13:01:02 UTC

[royale-asjs] branch develop updated: Spark CheckBox: Remove royale_wrapper for icon

This is an automated email from the ASF dual-hosted git repository.

piotrz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 6a24158  Spark CheckBox: Remove royale_wrapper for icon
6a24158 is described below

commit 6a24158993b3e9ed791dce02e427d3132992f5ff
Author: Piotr Zarzycki <pi...@gmail.com>
AuthorDate: Mon Oct 21 15:00:16 2019 +0200

    Spark CheckBox: Remove royale_wrapper for icon
    
    - It causes maximum stack overflow exception during size measurement (reference #479 )
---
 .../projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as   | 2 --
 1 file changed, 2 deletions(-)

diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
index 3d11ffa..aa7b55d 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
@@ -342,8 +342,6 @@ public class CheckBox extends ToggleButtonBase
         element.appendChild(_icon.element);
         
         element.appendChild(document.createTextNode(''));
-        //positioner.style.position = 'relative';
-        _icon.element.royale_wrapper = this;
         
         typeNames = 'CheckBox CheckBoxIcon';
         


Re: [royale-asjs] branch develop updated: Spark CheckBox: Remove royale_wrapper for icon

Posted by Piotr Zarzycki <pi...@gmail.com>.
Line with setting up royale_wrapper to this causes maximum stack overflow
exception in some scenario. More info about scenario ->
https://github.com/apache/royale-asjs/issues/479#issuecomment-543267296

pon., 21 paź 2019 o 15:01 <pi...@apache.org> napisał(a):

> This is an automated email from the ASF dual-hosted git repository.
>
> piotrz pushed a commit to branch develop
> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
>
>
> The following commit(s) were added to refs/heads/develop by this push:
>      new 6a24158  Spark CheckBox: Remove royale_wrapper for icon
> 6a24158 is described below
>
> commit 6a24158993b3e9ed791dce02e427d3132992f5ff
> Author: Piotr Zarzycki <pi...@gmail.com>
> AuthorDate: Mon Oct 21 15:00:16 2019 +0200
>
>     Spark CheckBox: Remove royale_wrapper for icon
>
>     - It causes maximum stack overflow exception during size measurement
> (reference #479 )
> ---
>  .../projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as   |
> 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git
> a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
> b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
> index 3d11ffa..aa7b55d 100644
> ---
> a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
> +++
> b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
> @@ -342,8 +342,6 @@ public class CheckBox extends ToggleButtonBase
>          element.appendChild(_icon.element);
>
>          element.appendChild(document.createTextNode(''));
> -        //positioner.style.position = 'relative';
> -        _icon.element.royale_wrapper = this;
>
>          typeNames = 'CheckBox CheckBoxIcon';
>
>
>

-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Re: [royale-asjs] branch develop updated: Spark CheckBox: Remove royale_wrapper for icon

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Hi Piotr,

I would want to understand how a child's getExplicitOrMeasuredWIdth ends up back at the TLC.  So maybe investigate that more carefully.  In theory, a child's explicit width or measuredWidth should not reference the parent.

But also note that the children scan in measuredWidth/Height is intended for a UIComponent made up of other UIComponents, like ComboBox.  In many cases, we compose components out of other Basic non-UIComponents.  I would expect the icon to not be a UIComponent.  And thus the coercion to IUIComponent in that loop should fail.  So if a TLC is not made up of UIComponents, then it might need a custom measuredWidth method, although in many cases so far, the computed offsetWidth is correct (or good enough), so mw!=0 (on line 2174) and you don't go into that children scan.

HTH,
-Alex


On 10/25/19, 9:32 AM, "Piotr Zarzycki" <pi...@gmail.com> wrote:

    Hi Alex,
    
    I just get back to it. Ok you are right that this is definitely not a fix.
    I should bring that code back. However I believe I'm starting to understand
    what is actually happening.
    CheckBox and RadioButton has children which are being setup royale_wrapper
    = this. If I use measuredWidth property I end up at some point in following
    place [1]. TLC is being scan with it's children - when child exists we are
    taking getExplicitOrMeasuredWidth, which  may end with using again
    measuredWidth cause getExplicitOrMeasuredWidth returns it. - Here is our
    "Maximum call stack size exceeded" issue.
    
    The question is should we getExplicitOrMeasuredWidth from children which
    has royale_wrapper = this ?
    
    [1]
    https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fblob%2Fc8783287c3e37658ef942d81797eb5337025c127%2Fframeworks%2Fprojects%2FMXRoyale%2Fsrc%2Fmain%2Froyale%2Fmx%2Fcore%2FUIComponent.as%23L2180&amp;data=02%7C01%7Caharui%40adobe.com%7Cd25295f06c9e459dc9fa08d75968e0aa%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637076179315418772&amp;sdata=5fN%2BbforHrBtzzIHJ3jupzBBJJNNE9FTymE1lMqf0I0%3D&amp;reserved=0
    
    Thanks,
    Piotr
    
    
    wt., 22 paź 2019 o 18:02 Alex Harui <ah...@adobe.com.invalid> napisał(a):
    
    > Responses in-line
    >
    > On 10/22/19, 1:52 AM, "Piotr Zarzycki" <pi...@gmail.com> wrote:
    >
    >     Comments inline.
    >
    >     pon., 21 paź 2019 o 18:25 Alex Harui <ah...@adobe.com.invalid>
    > napisał(a):
    >
    >     > Then you will need to explain why the event handling code that uses
    >     > royale_wrapper is not going to be invoked.  Maybe there is no way to
    >     > actually click on the icon (as opposed to the label next to the
    > icon)?
    >     >
    >     >
    >     I just checked CheckBox and nothing has changed. I can click on every
    >     element in CheckBox and it's being selected.
    >
    > Did you step through it in the debugger to make sure the target when
    > clicking on the icon element was the icon?
    >
    >     > If you look through the code, I believe we set royale_wrapper on just
    >     > about every child element in every other component.  Creating an
    > exception
    >     > must be justified.  The actual solution (some sort of stack
    > overflow) might
    >     > be better prevented by detecting the 'loop' of calls.  We do that in
    >     > several places already, like the layouts.
    >     >
    >     >
    >     Yes we are, but why in case o checkbox royale_wrapper is being set to
    >     children component (Icon in this case), as "this" ?
    >
    > royale_wrapper is used on all kinds of child elements in other components
    > to point to the top-level component (TLC).  There is code that tries to
    > determine that the "CheckBox" component is the dispatcher of some event
    > even though the browser is going to say it was some HTMLElement.  It is
    > effectively the back-reference from HTMLElements to the TLC.  In Flash, you
    > could use mouseChildren and mouseTransparent to affect the event.target.
    > In Royale, we have APIs like Event.isSameTarget().  I'm having trouble
    > believing that isSameTarget is going to work if you pass in the icon.
    >
    > I think I've said this before, but IMO, there is a difference between
    > application coding and framework coding.  When developing an application,
    > it is often ok for something to "just work" because that code only has to
    > work in that one application.  In framework development, it can't just work
    > for the one application you happen to be working on, it has to work for
    > everyone else's application as well, so decision have to be based on
    > fundamental logic and there has to be much less (although probably not
    > zero) code that "just works".
    >
    > When I saw your change, my first thought was: "(almost) all child elements
    > should have a royale_wrapper set to the TLC, so why is this an exception?"
    > Somehow, we need framework developers to learn the common patterns in the
    > framework or go searching for them because having an exception to the rules
    > is usually a sign that the code isn't right, even if it appears to work for
    > some scenario.  It will be a lot easier to teach other folks to be
    > framework developers and for them to learn how to debug the framework if
    > there is a consistent set of rules like "all child elements have
    > royale_wrapper set".
    >
    > I also looked at RadioButton and saw that it had its icon.royale_wrapper
    > set to the TLC.  Is it working correctly?  I grep'd the code for
    > royale_wrapper and saw how it was being used in lots of places and who was
    > reading it.  And that got me thinking it was a definite pattern and your
    > change was an exception and while it may look like it "just works" it may
    > not later if there is some event dispatched off the icon and no
    > royale_wrapper to use to determine the TLC.  Maybe if someone calls
    > isSameTarget on the event it will fail.
    >
    > My 2 cents,
    > -Alex
    >
    >
    >
    
    -- 
    
    Piotr Zarzycki
    
    Patreon: *https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&amp;data=02%7C01%7Caharui%40adobe.com%7Cd25295f06c9e459dc9fa08d75968e0aa%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637076179315418772&amp;sdata=QGprGzBDVRkoNyVlOS6WoREdXohjyRtN4aPbdh6fE94%3D&amp;reserved=0
    <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&amp;data=02%7C01%7Caharui%40adobe.com%7Cd25295f06c9e459dc9fa08d75968e0aa%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637076179315418772&amp;sdata=QGprGzBDVRkoNyVlOS6WoREdXohjyRtN4aPbdh6fE94%3D&amp;reserved=0>*
    


Re: [royale-asjs] branch develop updated: Spark CheckBox: Remove royale_wrapper for icon

Posted by Piotr Zarzycki <pi...@gmail.com>.
Hi Alex,

I just get back to it. Ok you are right that this is definitely not a fix.
I should bring that code back. However I believe I'm starting to understand
what is actually happening.
CheckBox and RadioButton has children which are being setup royale_wrapper
= this. If I use measuredWidth property I end up at some point in following
place [1]. TLC is being scan with it's children - when child exists we are
taking getExplicitOrMeasuredWidth, which  may end with using again
measuredWidth cause getExplicitOrMeasuredWidth returns it. - Here is our
"Maximum call stack size exceeded" issue.

The question is should we getExplicitOrMeasuredWidth from children which
has royale_wrapper = this ?

[1]
https://github.com/apache/royale-asjs/blob/c8783287c3e37658ef942d81797eb5337025c127/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as#L2180

Thanks,
Piotr


wt., 22 paź 2019 o 18:02 Alex Harui <ah...@adobe.com.invalid> napisał(a):

> Responses in-line
>
> On 10/22/19, 1:52 AM, "Piotr Zarzycki" <pi...@gmail.com> wrote:
>
>     Comments inline.
>
>     pon., 21 paź 2019 o 18:25 Alex Harui <ah...@adobe.com.invalid>
> napisał(a):
>
>     > Then you will need to explain why the event handling code that uses
>     > royale_wrapper is not going to be invoked.  Maybe there is no way to
>     > actually click on the icon (as opposed to the label next to the
> icon)?
>     >
>     >
>     I just checked CheckBox and nothing has changed. I can click on every
>     element in CheckBox and it's being selected.
>
> Did you step through it in the debugger to make sure the target when
> clicking on the icon element was the icon?
>
>     > If you look through the code, I believe we set royale_wrapper on just
>     > about every child element in every other component.  Creating an
> exception
>     > must be justified.  The actual solution (some sort of stack
> overflow) might
>     > be better prevented by detecting the 'loop' of calls.  We do that in
>     > several places already, like the layouts.
>     >
>     >
>     Yes we are, but why in case o checkbox royale_wrapper is being set to
>     children component (Icon in this case), as "this" ?
>
> royale_wrapper is used on all kinds of child elements in other components
> to point to the top-level component (TLC).  There is code that tries to
> determine that the "CheckBox" component is the dispatcher of some event
> even though the browser is going to say it was some HTMLElement.  It is
> effectively the back-reference from HTMLElements to the TLC.  In Flash, you
> could use mouseChildren and mouseTransparent to affect the event.target.
> In Royale, we have APIs like Event.isSameTarget().  I'm having trouble
> believing that isSameTarget is going to work if you pass in the icon.
>
> I think I've said this before, but IMO, there is a difference between
> application coding and framework coding.  When developing an application,
> it is often ok for something to "just work" because that code only has to
> work in that one application.  In framework development, it can't just work
> for the one application you happen to be working on, it has to work for
> everyone else's application as well, so decision have to be based on
> fundamental logic and there has to be much less (although probably not
> zero) code that "just works".
>
> When I saw your change, my first thought was: "(almost) all child elements
> should have a royale_wrapper set to the TLC, so why is this an exception?"
> Somehow, we need framework developers to learn the common patterns in the
> framework or go searching for them because having an exception to the rules
> is usually a sign that the code isn't right, even if it appears to work for
> some scenario.  It will be a lot easier to teach other folks to be
> framework developers and for them to learn how to debug the framework if
> there is a consistent set of rules like "all child elements have
> royale_wrapper set".
>
> I also looked at RadioButton and saw that it had its icon.royale_wrapper
> set to the TLC.  Is it working correctly?  I grep'd the code for
> royale_wrapper and saw how it was being used in lots of places and who was
> reading it.  And that got me thinking it was a definite pattern and your
> change was an exception and while it may look like it "just works" it may
> not later if there is some event dispatched off the icon and no
> royale_wrapper to use to determine the TLC.  Maybe if someone calls
> isSameTarget on the event it will fail.
>
> My 2 cents,
> -Alex
>
>
>

-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Re: [royale-asjs] branch develop updated: Spark CheckBox: Remove royale_wrapper for icon

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Responses in-line

On 10/22/19, 1:52 AM, "Piotr Zarzycki" <pi...@gmail.com> wrote:

    Comments inline.
    
    pon., 21 paź 2019 o 18:25 Alex Harui <ah...@adobe.com.invalid> napisał(a):
    
    > Then you will need to explain why the event handling code that uses
    > royale_wrapper is not going to be invoked.  Maybe there is no way to
    > actually click on the icon (as opposed to the label next to the icon)?
    >
    >
    I just checked CheckBox and nothing has changed. I can click on every
    element in CheckBox and it's being selected.
    
Did you step through it in the debugger to make sure the target when clicking on the icon element was the icon?
    
    > If you look through the code, I believe we set royale_wrapper on just
    > about every child element in every other component.  Creating an exception
    > must be justified.  The actual solution (some sort of stack overflow) might
    > be better prevented by detecting the 'loop' of calls.  We do that in
    > several places already, like the layouts.
    >
    >
    Yes we are, but why in case o checkbox royale_wrapper is being set to
    children component (Icon in this case), as "this" ?
    
royale_wrapper is used on all kinds of child elements in other components to point to the top-level component (TLC).  There is code that tries to determine that the "CheckBox" component is the dispatcher of some event even though the browser is going to say it was some HTMLElement.  It is effectively the back-reference from HTMLElements to the TLC.  In Flash, you could use mouseChildren and mouseTransparent to affect the event.target.  In Royale, we have APIs like Event.isSameTarget().  I'm having trouble believing that isSameTarget is going to work if you pass in the icon.

I think I've said this before, but IMO, there is a difference between application coding and framework coding.  When developing an application, it is often ok for something to "just work" because that code only has to work in that one application.  In framework development, it can't just work for the one application you happen to be working on, it has to work for everyone else's application as well, so decision have to be based on fundamental logic and there has to be much less (although probably not zero) code that "just works".

When I saw your change, my first thought was: "(almost) all child elements should have a royale_wrapper set to the TLC, so why is this an exception?"  Somehow, we need framework developers to learn the common patterns in the framework or go searching for them because having an exception to the rules is usually a sign that the code isn't right, even if it appears to work for some scenario.  It will be a lot easier to teach other folks to be framework developers and for them to learn how to debug the framework if there is a consistent set of rules like "all child elements have royale_wrapper set".

I also looked at RadioButton and saw that it had its icon.royale_wrapper set to the TLC.  Is it working correctly?  I grep'd the code for royale_wrapper and saw how it was being used in lots of places and who was reading it.  And that got me thinking it was a definite pattern and your change was an exception and while it may look like it "just works" it may not later if there is some event dispatched off the icon and no royale_wrapper to use to determine the TLC.  Maybe if someone calls isSameTarget on the event it will fail.

My 2 cents,
-Alex
 


Re: [royale-asjs] branch develop updated: Spark CheckBox: Remove royale_wrapper for icon

Posted by Piotr Zarzycki <pi...@gmail.com>.
Comments inline.

pon., 21 paź 2019 o 18:25 Alex Harui <ah...@adobe.com.invalid> napisał(a):

> Then you will need to explain why the event handling code that uses
> royale_wrapper is not going to be invoked.  Maybe there is no way to
> actually click on the icon (as opposed to the label next to the icon)?
>
>
I just checked CheckBox and nothing has changed. I can click on every
element in CheckBox and it's being selected.


> If you look through the code, I believe we set royale_wrapper on just
> about every child element in every other component.  Creating an exception
> must be justified.  The actual solution (some sort of stack overflow) might
> be better prevented by detecting the 'loop' of calls.  We do that in
> several places already, like the layouts.
>
>
Yes we are, but why in case o checkbox royale_wrapper is being set to
children component (Icon in this case), as "this" ?


> -Alex
>
> On 10/21/19, 9:10 AM, "Piotr Zarzycki" <pi...@gmail.com> wrote:
>
>     I will investigate that tomorrow, but so far everything is working
> without
>     this code.
>
>     Thanks!
>
>     pon., 21 paź 2019 o 18:05 Alex Harui <ah...@adobe.com.invalid>
> napisał(a):
>
>     > I would expect that this change would cause clicking on the icon to
> fail.
>     >  Royale_wrapper is used to find the component that owns the element
> that
>     > was clicked.   If not, why not?
>     >
>     > Thanks,
>     > -Alex
>     >
>     > On 10/21/19, 6:01 AM, "piotrz@apache.org" <pi...@apache.org> wrote:
>     >
>     >     This is an automated email from the ASF dual-hosted git
> repository.
>     >
>     >     piotrz pushed a commit to branch develop
>     >     in repository
>     >
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.git&amp;data=02%7C01%7Caharui%40adobe.com%7C2684b08f468d4f19473d08d756413103%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637072710302383350&amp;sdata=mUjpHyP%2Batw5%2BkF%2Bhh%2Fta1PhDjHovAiu2yLXYNGZOy4%3D&amp;reserved=0
>     >
>     >
>     >     The following commit(s) were added to refs/heads/develop by this
> push:
>     >          new 6a24158  Spark CheckBox: Remove royale_wrapper for icon
>     >     6a24158 is described below
>     >
>     >     commit 6a24158993b3e9ed791dce02e427d3132992f5ff
>     >     Author: Piotr Zarzycki <pi...@gmail.com>
>     >     AuthorDate: Mon Oct 21 15:00:16 2019 +0200
>     >
>     >         Spark CheckBox: Remove royale_wrapper for icon
>     >
>     >         - It causes maximum stack overflow exception during size
>     > measurement (reference #479 )
>     >     ---
>     >
>     >
> .../projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as   |
>     > 2 --
>     >      1 file changed, 2 deletions(-)
>     >
>     >     diff --git
>     >
> a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
>     >
> b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
>     >     index 3d11ffa..aa7b55d 100644
>     >     ---
>     >
> a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
>     >     +++
>     >
> b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
>     >     @@ -342,8 +342,6 @@ public class CheckBox extends
> ToggleButtonBase
>     >              element.appendChild(_icon.element);
>     >
>     >              element.appendChild(document.createTextNode(''));
>     >     -        //positioner.style.position = 'relative';
>     >     -        _icon.element.royale_wrapper = this;
>     >
>     >              typeNames = 'CheckBox CheckBoxIcon';
>     >
>     >
>     >
>     >
>     >
>
>     --
>
>     Piotr Zarzycki
>
>     Patreon: *
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&amp;data=02%7C01%7Caharui%40adobe.com%7C2684b08f468d4f19473d08d756413103%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637072710302393343&amp;sdata=JnS1xaxIUD2p%2FshjwUPhnX4%2F7XOLwg6LG%2FlcgR8zgjw%3D&amp;reserved=0
>     <
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&amp;data=02%7C01%7Caharui%40adobe.com%7C2684b08f468d4f19473d08d756413103%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637072710302393343&amp;sdata=JnS1xaxIUD2p%2FshjwUPhnX4%2F7XOLwg6LG%2FlcgR8zgjw%3D&amp;reserved=0
> >*
>
>
>

-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Re: [royale-asjs] branch develop updated: Spark CheckBox: Remove royale_wrapper for icon

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Then you will need to explain why the event handling code that uses royale_wrapper is not going to be invoked.  Maybe there is no way to actually click on the icon (as opposed to the label next to the icon)?

If you look through the code, I believe we set royale_wrapper on just about every child element in every other component.  Creating an exception must be justified.  The actual solution (some sort of stack overflow) might be better prevented by detecting the 'loop' of calls.  We do that in several places already, like the layouts.

-Alex

On 10/21/19, 9:10 AM, "Piotr Zarzycki" <pi...@gmail.com> wrote:

    I will investigate that tomorrow, but so far everything is working without
    this code.
    
    Thanks!
    
    pon., 21 paź 2019 o 18:05 Alex Harui <ah...@adobe.com.invalid> napisał(a):
    
    > I would expect that this change would cause clicking on the icon to fail.
    >  Royale_wrapper is used to find the component that owns the element that
    > was clicked.   If not, why not?
    >
    > Thanks,
    > -Alex
    >
    > On 10/21/19, 6:01 AM, "piotrz@apache.org" <pi...@apache.org> wrote:
    >
    >     This is an automated email from the ASF dual-hosted git repository.
    >
    >     piotrz pushed a commit to branch develop
    >     in repository
    > https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.git&amp;data=02%7C01%7Caharui%40adobe.com%7C2684b08f468d4f19473d08d756413103%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637072710302383350&amp;sdata=mUjpHyP%2Batw5%2BkF%2Bhh%2Fta1PhDjHovAiu2yLXYNGZOy4%3D&amp;reserved=0
    >
    >
    >     The following commit(s) were added to refs/heads/develop by this push:
    >          new 6a24158  Spark CheckBox: Remove royale_wrapper for icon
    >     6a24158 is described below
    >
    >     commit 6a24158993b3e9ed791dce02e427d3132992f5ff
    >     Author: Piotr Zarzycki <pi...@gmail.com>
    >     AuthorDate: Mon Oct 21 15:00:16 2019 +0200
    >
    >         Spark CheckBox: Remove royale_wrapper for icon
    >
    >         - It causes maximum stack overflow exception during size
    > measurement (reference #479 )
    >     ---
    >
    >  .../projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as   |
    > 2 --
    >      1 file changed, 2 deletions(-)
    >
    >     diff --git
    > a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
    > b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
    >     index 3d11ffa..aa7b55d 100644
    >     ---
    > a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
    >     +++
    > b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
    >     @@ -342,8 +342,6 @@ public class CheckBox extends ToggleButtonBase
    >              element.appendChild(_icon.element);
    >
    >              element.appendChild(document.createTextNode(''));
    >     -        //positioner.style.position = 'relative';
    >     -        _icon.element.royale_wrapper = this;
    >
    >              typeNames = 'CheckBox CheckBoxIcon';
    >
    >
    >
    >
    >
    
    -- 
    
    Piotr Zarzycki
    
    Patreon: *https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&amp;data=02%7C01%7Caharui%40adobe.com%7C2684b08f468d4f19473d08d756413103%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637072710302393343&amp;sdata=JnS1xaxIUD2p%2FshjwUPhnX4%2F7XOLwg6LG%2FlcgR8zgjw%3D&amp;reserved=0
    <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&amp;data=02%7C01%7Caharui%40adobe.com%7C2684b08f468d4f19473d08d756413103%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637072710302393343&amp;sdata=JnS1xaxIUD2p%2FshjwUPhnX4%2F7XOLwg6LG%2FlcgR8zgjw%3D&amp;reserved=0>*
    


Re: [royale-asjs] branch develop updated: Spark CheckBox: Remove royale_wrapper for icon

Posted by Piotr Zarzycki <pi...@gmail.com>.
I will investigate that tomorrow, but so far everything is working without
this code.

Thanks!

pon., 21 paź 2019 o 18:05 Alex Harui <ah...@adobe.com.invalid> napisał(a):

> I would expect that this change would cause clicking on the icon to fail.
>  Royale_wrapper is used to find the component that owns the element that
> was clicked.   If not, why not?
>
> Thanks,
> -Alex
>
> On 10/21/19, 6:01 AM, "piotrz@apache.org" <pi...@apache.org> wrote:
>
>     This is an automated email from the ASF dual-hosted git repository.
>
>     piotrz pushed a commit to branch develop
>     in repository
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.git&amp;data=02%7C01%7Caharui%40adobe.com%7C4e28d579788b41297fd808d75626bb1e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C637072596658923892&amp;sdata=ztUNLAJPjSVRgumISnPSO2CqQTLwRc%2BOJ00TwJrHZ%2F4%3D&amp;reserved=0
>
>
>     The following commit(s) were added to refs/heads/develop by this push:
>          new 6a24158  Spark CheckBox: Remove royale_wrapper for icon
>     6a24158 is described below
>
>     commit 6a24158993b3e9ed791dce02e427d3132992f5ff
>     Author: Piotr Zarzycki <pi...@gmail.com>
>     AuthorDate: Mon Oct 21 15:00:16 2019 +0200
>
>         Spark CheckBox: Remove royale_wrapper for icon
>
>         - It causes maximum stack overflow exception during size
> measurement (reference #479 )
>     ---
>
>  .../projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as   |
> 2 --
>      1 file changed, 2 deletions(-)
>
>     diff --git
> a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
> b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
>     index 3d11ffa..aa7b55d 100644
>     ---
> a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
>     +++
> b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
>     @@ -342,8 +342,6 @@ public class CheckBox extends ToggleButtonBase
>              element.appendChild(_icon.element);
>
>              element.appendChild(document.createTextNode(''));
>     -        //positioner.style.position = 'relative';
>     -        _icon.element.royale_wrapper = this;
>
>              typeNames = 'CheckBox CheckBoxIcon';
>
>
>
>
>

-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Re: [royale-asjs] branch develop updated: Spark CheckBox: Remove royale_wrapper for icon

Posted by Alex Harui <ah...@adobe.com.INVALID>.
I would expect that this change would cause clicking on the icon to fail.   Royale_wrapper is used to find the component that owns the element that was clicked.   If not, why not?

Thanks,
-Alex

On 10/21/19, 6:01 AM, "piotrz@apache.org" <pi...@apache.org> wrote:

    This is an automated email from the ASF dual-hosted git repository.
    
    piotrz pushed a commit to branch develop
    in repository https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.git&amp;data=02%7C01%7Caharui%40adobe.com%7C4e28d579788b41297fd808d75626bb1e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C637072596658923892&amp;sdata=ztUNLAJPjSVRgumISnPSO2CqQTLwRc%2BOJ00TwJrHZ%2F4%3D&amp;reserved=0
    
    
    The following commit(s) were added to refs/heads/develop by this push:
         new 6a24158  Spark CheckBox: Remove royale_wrapper for icon
    6a24158 is described below
    
    commit 6a24158993b3e9ed791dce02e427d3132992f5ff
    Author: Piotr Zarzycki <pi...@gmail.com>
    AuthorDate: Mon Oct 21 15:00:16 2019 +0200
    
        Spark CheckBox: Remove royale_wrapper for icon
        
        - It causes maximum stack overflow exception during size measurement (reference #479 )
    ---
     .../projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as   | 2 --
     1 file changed, 2 deletions(-)
    
    diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
    index 3d11ffa..aa7b55d 100644
    --- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
    +++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
    @@ -342,8 +342,6 @@ public class CheckBox extends ToggleButtonBase
             element.appendChild(_icon.element);
             
             element.appendChild(document.createTextNode(''));
    -        //positioner.style.position = 'relative';
    -        _icon.element.royale_wrapper = this;
             
             typeNames = 'CheckBox CheckBoxIcon';