You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Piotr Zarzycki <pi...@gmail.com> on 2018/04/27 20:07:44 UTC

States doesn't work properly anymore

Hi Guys,

I've been working on some update to my TranspiledActionScript website. I
have noticed that with current version of Nightly builds states are not
working properly.

I uploaded copy of my website here [1].

If you switch view from "Examples" to "Snippets" you should see that
background is not changing at all. You can see how it should work correctly
on the main page [2].

I'm basically changing classes using states - code responsible for that is
here [3]. I will look tomorrow whether className changes causes that or
something else.

Just wanted to report here that issue.

[1] http://transpiledactionscript.com/dev/examples/TranspiledActionScript/
[2] http://transpiledactionscript.com/
[3] https://bit.ly/2HzZDXo

Thanks,
-- 

Piotr Zarzycki

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

Re: States doesn't work properly anymore

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

Many thanks for this solution. I have implemented it and it seems to be ok
right now. It's enough if I pickup one level up parent. Currently I used
that [1] function only in NavigationLayout component, but if I see that
some of the component will generate additional container after upgrade I
will use it. I have raised issue and close it after some time. [2]

[1] https://bit.ly/2FKq8Yp
[2] https://github.com/apache/royale-asjs/issues/222

Thanks,
Piotr


2018-05-03 11:02 GMT+02:00 Alex Harui <ah...@adobe.com.invalid>:

> Thinking about it for a few minutes, I have the following thoughts:
>
> The primary rule should be that you can walk the parent chain from any
> HTMLElement.  You could override the parent getter to return the right
> value.
>
> For debugging, it would be helpful to have royale_wrapper on every
> element, but if you know the topology, you can probably examine a childNode
> or parentNode and find its royale_wrapper.
>
> Of course, I could be wrong...
> -Alex
>
> On 5/3/18, 1:02 AM, "Piotr Zarzycki" <pi...@gmail.com> wrote:
>
>     Alex,
>
>     I had some session yesterday with that and I think I have found the
> reason.
>     It is connected with how MDL is working. Let's start from the initial
> code
>
>     This is how code looks like:
>     <js:View> -> After translation -> <div>
>          <mdl:NavigationLayout currentState="Examples"
>     className.Examples="examplesBackground"></mdl:NavigationLayout> ->
> after
>     translation -> <div>
>     </js:View>
>
>     In above case the parent of NavigationLayout should be, a View, but it
>     isn't. Each MDL component is going through some kind of invalidation
>     mechanism - it's called upgrading. Sometime in the results of
> upgrading MDL
>     library is adding additional containers. In above case our translated
> code
>     should looks like:
>
>     <div>
>        <div class="examplesBackground"></div>
>     </div>
>
>     BUT it looks like that:
>
>     <div>
>        <div class="mdl-layout__container"> - This ELEMENT is not a Royale
>     creation. It doesn't have  royale_wrapper.
>             <div class="examplesBackground"></div>
>         </div>
>     </div>
>
>     Initial state is setting up correctly along with initial class "
>     examplesBackground"
>     - However changes are not possible because we are checking whether
> parent
>     exists and it exists but it's not a Royale component.
>
>     I'm not sure how to fix that yet.
>
>     Thanks, Piotr
>
>
>     2018-05-01 22:26 GMT+02:00 Alex Harui <ah...@adobe.com.invalid>:
>
>     > An element without a royale_wrapper breaks the fundamental contract
> in
>     > UIBase.  I recommend that you figure that part out.
>     >
>     > Good luck,
>     > -Alex
>     >
>     > On 5/1/18, 12:33 PM, "Piotr Zarzycki" <pi...@gmail.com>
> wrote:
>     >
>     >     In the other words - My website is loaded and component have
> initial
>     > state.
>     >
>     >     Than I'm clicking on the button I'm changing state for that
> component.
>     >
>     >     Piotr
>     >
>     >     On Tue, May 1, 2018, 7:27 PM Piotr Zarzycki <
> piotrzarzycki21@gmail.com
>     > >
>     >     wrote:
>     >
>     >     > This component is already on the display list. I'm changing
> States
>     > of that
>     >     > component. That's the weirdest thing.
>     >     >
>     >     > Piotr
>     >     >
>     >     > On Tue, May 1, 2018, 7:06 PM Alex Harui
> <ah...@adobe.com.invalid>
>     > wrote:
>     >     >
>     >     >> Hi Piotr,
>     >     >>
>     >     >> What is the call stack at that point?  Should the component
> be on
>     > the
>     >     >> display list or is it still having its properties set up per
> the
>     >     >> lifecycle?  If it is just having its properties set up, there
>     > should be
>     >     >> another call to setClassName in addedToParent and parent
> should not
>     > be
>     >     >> undefined.
>     >     >>
>     >     >> -Alex
>     >     >>
>     >     >> On 5/1/18, 9:58 AM, "piotrz" <pi...@apache.org> wrote:
>     >     >>
>     >     >>     Alex,
>     >     >>
>     >     >>     I just checked getter for parent and royale_wrapper on
> element
>     > is
>     >     >> undefined.
>     >     >>
>     >     >>     <
>     >     >> https://na01.safelinks.protection.outlook.com/?url=
>     > http%3A%2F%2Fapache-royale-development.20373.n8.nabble.
>     > com%2Ffile%2Ft1%2Froyale_wrapper_undefined.png&data=02%
>     > 7C01%7Caharui%40adobe.com%7C4df3cf45055440294eb908d5af84cc3e%
>     > 7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
> 7C636607907300284114&sdata=%
>     > 2BWvX%2B84oVUsWZO4Q3rO4QwPRnR1TcZJKseXYJB1ni8U%3D&reserved=0>
>     >     >>
>     >     >>
>     >     >>     Piotr
>     >     >>
>     >     >>
>     >     >>
>     >     >>
>     >     >>
>     >     >>     --
>     >     >>     Sent from:
>     >     >> https://na01.safelinks.protection.outlook.com/?url=
>     > http%3A%2F%2Fapache-royale-development.20373.n8.nabble.
>     > com%2F&data=02%7C01%7Caharui%40adobe.com%
> 7C4df3cf45055440294eb908d5af84
>     > cc3e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
>     > 7C636607907300284114&sdata=W4AV3qDPNfO1VlCywDh5bd5u9Oa7Fh
>     > 0JXDhzrFIp%2FMM%3D&reserved=0
>     >     >>
>     >     >>
>     >     >>
>     >
>     >
>     >
>
>
>     --
>
>     Piotr Zarzycki
>
>     Patreon: *https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%
> 7Caharui%40adobe.com%7C7640613e7868437002e208d5b0cc25c9%
> 7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636609313211834709&sdata=
> y4uHhs%2BZXUSPFFQR26y3lP5tGlYizJJfB0r3lR%2B%2FiG4%3D&reserved=0
>     <https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%
> 7Caharui%40adobe.com%7C7640613e7868437002e208d5b0cc25c9%
> 7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636609313211834709&sdata=
> y4uHhs%2BZXUSPFFQR26y3lP5tGlYizJJfB0r3lR%2B%2FiG4%3D&reserved=0>*
>
>
>


-- 

Piotr Zarzycki

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

Re: States doesn't work properly anymore

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Thinking about it for a few minutes, I have the following thoughts:

The primary rule should be that you can walk the parent chain from any HTMLElement.  You could override the parent getter to return the right value.

For debugging, it would be helpful to have royale_wrapper on every element, but if you know the topology, you can probably examine a childNode or parentNode and find its royale_wrapper.

Of course, I could be wrong...
-Alex

On 5/3/18, 1:02 AM, "Piotr Zarzycki" <pi...@gmail.com> wrote:

    Alex,
    
    I had some session yesterday with that and I think I have found the reason.
    It is connected with how MDL is working. Let's start from the initial code
    
    This is how code looks like:
    <js:View> -> After translation -> <div>
         <mdl:NavigationLayout currentState="Examples"
    className.Examples="examplesBackground"></mdl:NavigationLayout> -> after
    translation -> <div>
    </js:View>
    
    In above case the parent of NavigationLayout should be, a View, but it
    isn't. Each MDL component is going through some kind of invalidation
    mechanism - it's called upgrading. Sometime in the results of upgrading MDL
    library is adding additional containers. In above case our translated code
    should looks like:
    
    <div>
       <div class="examplesBackground"></div>
    </div>
    
    BUT it looks like that:
    
    <div>
       <div class="mdl-layout__container"> - This ELEMENT is not a Royale
    creation. It doesn't have  royale_wrapper.
            <div class="examplesBackground"></div>
        </div>
    </div>
    
    Initial state is setting up correctly along with initial class "
    examplesBackground"
    - However changes are not possible because we are checking whether parent
    exists and it exists but it's not a Royale component.
    
    I'm not sure how to fix that yet.
    
    Thanks, Piotr
    
    
    2018-05-01 22:26 GMT+02:00 Alex Harui <ah...@adobe.com.invalid>:
    
    > An element without a royale_wrapper breaks the fundamental contract in
    > UIBase.  I recommend that you figure that part out.
    >
    > Good luck,
    > -Alex
    >
    > On 5/1/18, 12:33 PM, "Piotr Zarzycki" <pi...@gmail.com> wrote:
    >
    >     In the other words - My website is loaded and component have initial
    > state.
    >
    >     Than I'm clicking on the button I'm changing state for that component.
    >
    >     Piotr
    >
    >     On Tue, May 1, 2018, 7:27 PM Piotr Zarzycki <piotrzarzycki21@gmail.com
    > >
    >     wrote:
    >
    >     > This component is already on the display list. I'm changing States
    > of that
    >     > component. That's the weirdest thing.
    >     >
    >     > Piotr
    >     >
    >     > On Tue, May 1, 2018, 7:06 PM Alex Harui <ah...@adobe.com.invalid>
    > wrote:
    >     >
    >     >> Hi Piotr,
    >     >>
    >     >> What is the call stack at that point?  Should the component be on
    > the
    >     >> display list or is it still having its properties set up per the
    >     >> lifecycle?  If it is just having its properties set up, there
    > should be
    >     >> another call to setClassName in addedToParent and parent should not
    > be
    >     >> undefined.
    >     >>
    >     >> -Alex
    >     >>
    >     >> On 5/1/18, 9:58 AM, "piotrz" <pi...@apache.org> wrote:
    >     >>
    >     >>     Alex,
    >     >>
    >     >>     I just checked getter for parent and royale_wrapper on element
    > is
    >     >> undefined.
    >     >>
    >     >>     <
    >     >> https://na01.safelinks.protection.outlook.com/?url=
    > http%3A%2F%2Fapache-royale-development.20373.n8.nabble.
    > com%2Ffile%2Ft1%2Froyale_wrapper_undefined.png&data=02%
    > 7C01%7Caharui%40adobe.com%7C4df3cf45055440294eb908d5af84cc3e%
    > 7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607907300284114&sdata=%
    > 2BWvX%2B84oVUsWZO4Q3rO4QwPRnR1TcZJKseXYJB1ni8U%3D&reserved=0>
    >     >>
    >     >>
    >     >>     Piotr
    >     >>
    >     >>
    >     >>
    >     >>
    >     >>
    >     >>     --
    >     >>     Sent from:
    >     >> https://na01.safelinks.protection.outlook.com/?url=
    > http%3A%2F%2Fapache-royale-development.20373.n8.nabble.
    > com%2F&data=02%7C01%7Caharui%40adobe.com%7C4df3cf45055440294eb908d5af84
    > cc3e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
    > 7C636607907300284114&sdata=W4AV3qDPNfO1VlCywDh5bd5u9Oa7Fh
    > 0JXDhzrFIp%2FMM%3D&reserved=0
    >     >>
    >     >>
    >     >>
    >
    >
    >
    
    
    -- 
    
    Piotr Zarzycki
    
    Patreon: *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7C7640613e7868437002e208d5b0cc25c9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636609313211834709&sdata=y4uHhs%2BZXUSPFFQR26y3lP5tGlYizJJfB0r3lR%2B%2FiG4%3D&reserved=0
    <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7C7640613e7868437002e208d5b0cc25c9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636609313211834709&sdata=y4uHhs%2BZXUSPFFQR26y3lP5tGlYizJJfB0r3lR%2B%2FiG4%3D&reserved=0>*
    


Re: States doesn't work properly anymore

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

I had some session yesterday with that and I think I have found the reason.
It is connected with how MDL is working. Let's start from the initial code

This is how code looks like:
<js:View> -> After translation -> <div>
     <mdl:NavigationLayout currentState="Examples"
className.Examples="examplesBackground"></mdl:NavigationLayout> -> after
translation -> <div>
</js:View>

In above case the parent of NavigationLayout should be, a View, but it
isn't. Each MDL component is going through some kind of invalidation
mechanism - it's called upgrading. Sometime in the results of upgrading MDL
library is adding additional containers. In above case our translated code
should looks like:

<div>
   <div class="examplesBackground"></div>
</div>

BUT it looks like that:

<div>
   <div class="mdl-layout__container"> - This ELEMENT is not a Royale
creation. It doesn't have  royale_wrapper.
        <div class="examplesBackground"></div>
    </div>
</div>

Initial state is setting up correctly along with initial class "
examplesBackground"
- However changes are not possible because we are checking whether parent
exists and it exists but it's not a Royale component.

I'm not sure how to fix that yet.

Thanks, Piotr


2018-05-01 22:26 GMT+02:00 Alex Harui <ah...@adobe.com.invalid>:

> An element without a royale_wrapper breaks the fundamental contract in
> UIBase.  I recommend that you figure that part out.
>
> Good luck,
> -Alex
>
> On 5/1/18, 12:33 PM, "Piotr Zarzycki" <pi...@gmail.com> wrote:
>
>     In the other words - My website is loaded and component have initial
> state.
>
>     Than I'm clicking on the button I'm changing state for that component.
>
>     Piotr
>
>     On Tue, May 1, 2018, 7:27 PM Piotr Zarzycki <piotrzarzycki21@gmail.com
> >
>     wrote:
>
>     > This component is already on the display list. I'm changing States
> of that
>     > component. That's the weirdest thing.
>     >
>     > Piotr
>     >
>     > On Tue, May 1, 2018, 7:06 PM Alex Harui <ah...@adobe.com.invalid>
> wrote:
>     >
>     >> Hi Piotr,
>     >>
>     >> What is the call stack at that point?  Should the component be on
> the
>     >> display list or is it still having its properties set up per the
>     >> lifecycle?  If it is just having its properties set up, there
> should be
>     >> another call to setClassName in addedToParent and parent should not
> be
>     >> undefined.
>     >>
>     >> -Alex
>     >>
>     >> On 5/1/18, 9:58 AM, "piotrz" <pi...@apache.org> wrote:
>     >>
>     >>     Alex,
>     >>
>     >>     I just checked getter for parent and royale_wrapper on element
> is
>     >> undefined.
>     >>
>     >>     <
>     >> https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Fapache-royale-development.20373.n8.nabble.
> com%2Ffile%2Ft1%2Froyale_wrapper_undefined.png&data=02%
> 7C01%7Caharui%40adobe.com%7C4df3cf45055440294eb908d5af84cc3e%
> 7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607907300284114&sdata=%
> 2BWvX%2B84oVUsWZO4Q3rO4QwPRnR1TcZJKseXYJB1ni8U%3D&reserved=0>
>     >>
>     >>
>     >>     Piotr
>     >>
>     >>
>     >>
>     >>
>     >>
>     >>     --
>     >>     Sent from:
>     >> https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Fapache-royale-development.20373.n8.nabble.
> com%2F&data=02%7C01%7Caharui%40adobe.com%7C4df3cf45055440294eb908d5af84
> cc3e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
> 7C636607907300284114&sdata=W4AV3qDPNfO1VlCywDh5bd5u9Oa7Fh
> 0JXDhzrFIp%2FMM%3D&reserved=0
>     >>
>     >>
>     >>
>
>
>


-- 

Piotr Zarzycki

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

Re: States doesn't work properly anymore

Posted by Alex Harui <ah...@adobe.com.INVALID>.
An element without a royale_wrapper breaks the fundamental contract in UIBase.  I recommend that you figure that part out.

Good luck,
-Alex

On 5/1/18, 12:33 PM, "Piotr Zarzycki" <pi...@gmail.com> wrote:

    In the other words - My website is loaded and component have initial state.
    
    Than I'm clicking on the button I'm changing state for that component.
    
    Piotr
    
    On Tue, May 1, 2018, 7:27 PM Piotr Zarzycki <pi...@gmail.com>
    wrote:
    
    > This component is already on the display list. I'm changing States of that
    > component. That's the weirdest thing.
    >
    > Piotr
    >
    > On Tue, May 1, 2018, 7:06 PM Alex Harui <ah...@adobe.com.invalid> wrote:
    >
    >> Hi Piotr,
    >>
    >> What is the call stack at that point?  Should the component be on the
    >> display list or is it still having its properties set up per the
    >> lifecycle?  If it is just having its properties set up, there should be
    >> another call to setClassName in addedToParent and parent should not be
    >> undefined.
    >>
    >> -Alex
    >>
    >> On 5/1/18, 9:58 AM, "piotrz" <pi...@apache.org> wrote:
    >>
    >>     Alex,
    >>
    >>     I just checked getter for parent and royale_wrapper on element is
    >> undefined.
    >>
    >>     <
    >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Froyale_wrapper_undefined.png&data=02%7C01%7Caharui%40adobe.com%7C4df3cf45055440294eb908d5af84cc3e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607907300284114&sdata=%2BWvX%2B84oVUsWZO4Q3rO4QwPRnR1TcZJKseXYJB1ni8U%3D&reserved=0>
    >>
    >>
    >>     Piotr
    >>
    >>
    >>
    >>
    >>
    >>     --
    >>     Sent from:
    >> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7C4df3cf45055440294eb908d5af84cc3e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607907300284114&sdata=W4AV3qDPNfO1VlCywDh5bd5u9Oa7Fh0JXDhzrFIp%2FMM%3D&reserved=0
    >>
    >>
    >>
    


Re: States doesn't work properly anymore

Posted by Piotr Zarzycki <pi...@gmail.com>.
In the other words - My website is loaded and component have initial state.

Than I'm clicking on the button I'm changing state for that component.

Piotr

On Tue, May 1, 2018, 7:27 PM Piotr Zarzycki <pi...@gmail.com>
wrote:

> This component is already on the display list. I'm changing States of that
> component. That's the weirdest thing.
>
> Piotr
>
> On Tue, May 1, 2018, 7:06 PM Alex Harui <ah...@adobe.com.invalid> wrote:
>
>> Hi Piotr,
>>
>> What is the call stack at that point?  Should the component be on the
>> display list or is it still having its properties set up per the
>> lifecycle?  If it is just having its properties set up, there should be
>> another call to setClassName in addedToParent and parent should not be
>> undefined.
>>
>> -Alex
>>
>> On 5/1/18, 9:58 AM, "piotrz" <pi...@apache.org> wrote:
>>
>>     Alex,
>>
>>     I just checked getter for parent and royale_wrapper on element is
>> undefined.
>>
>>     <
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Froyale_wrapper_undefined.png&data=02%7C01%7Caharui%40adobe.com%7C4df3cf45055440294eb908d5af84cc3e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607907300284114&sdata=%2BWvX%2B84oVUsWZO4Q3rO4QwPRnR1TcZJKseXYJB1ni8U%3D&reserved=0>
>>
>>
>>     Piotr
>>
>>
>>
>>
>>
>>     --
>>     Sent from:
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7C4df3cf45055440294eb908d5af84cc3e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607907300284114&sdata=W4AV3qDPNfO1VlCywDh5bd5u9Oa7Fh0JXDhzrFIp%2FMM%3D&reserved=0
>>
>>
>>

Re: States doesn't work properly anymore

Posted by Piotr Zarzycki <pi...@gmail.com>.
This component is already on the display list. I'm changing States of that
component. That's the weirdest thing.

Piotr

On Tue, May 1, 2018, 7:06 PM Alex Harui <ah...@adobe.com.invalid> wrote:

> Hi Piotr,
>
> What is the call stack at that point?  Should the component be on the
> display list or is it still having its properties set up per the
> lifecycle?  If it is just having its properties set up, there should be
> another call to setClassName in addedToParent and parent should not be
> undefined.
>
> -Alex
>
> On 5/1/18, 9:58 AM, "piotrz" <pi...@apache.org> wrote:
>
>     Alex,
>
>     I just checked getter for parent and royale_wrapper on element is
> undefined.
>
>     <
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Froyale_wrapper_undefined.png&data=02%7C01%7Caharui%40adobe.com%7C4df3cf45055440294eb908d5af84cc3e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607907300284114&sdata=%2BWvX%2B84oVUsWZO4Q3rO4QwPRnR1TcZJKseXYJB1ni8U%3D&reserved=0>
>
>
>     Piotr
>
>
>
>
>
>     --
>     Sent from:
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7C4df3cf45055440294eb908d5af84cc3e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607907300284114&sdata=W4AV3qDPNfO1VlCywDh5bd5u9Oa7Fh0JXDhzrFIp%2FMM%3D&reserved=0
>
>
>

Re: States doesn't work properly anymore

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

What is the call stack at that point?  Should the component be on the display list or is it still having its properties set up per the lifecycle?  If it is just having its properties set up, there should be another call to setClassName in addedToParent and parent should not be undefined.

-Alex

On 5/1/18, 9:58 AM, "piotrz" <pi...@apache.org> wrote:

    Alex,
    
    I just checked getter for parent and royale_wrapper on element is undefined.
    
    <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Froyale_wrapper_undefined.png&data=02%7C01%7Caharui%40adobe.com%7C4df3cf45055440294eb908d5af84cc3e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607907300284114&sdata=%2BWvX%2B84oVUsWZO4Q3rO4QwPRnR1TcZJKseXYJB1ni8U%3D&reserved=0> 
    
    Piotr
    
    
    
    
    
    --
    Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7C4df3cf45055440294eb908d5af84cc3e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607907300284114&sdata=W4AV3qDPNfO1VlCywDh5bd5u9Oa7Fh0JXDhzrFIp%2FMM%3D&reserved=0
    


Re: States doesn't work properly anymore

Posted by piotrz <pi...@apache.org>.
Alex,

I just checked getter for parent and royale_wrapper on element is undefined.

<http://apache-royale-development.20373.n8.nabble.com/file/t1/royale_wrapper_undefined.png> 

Piotr





--
Sent from: http://apache-royale-development.20373.n8.nabble.com/

Re: States doesn't work properly anymore

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Because setClassNames can be expensive, we only want to do it if we have to.  The component lifecycle is designed for setting lots of properties before adding a component to its parent.  There is a call to setClassNames in addedToParent for that reason, so other calls to set the className shouldn't bother to do all of that work.

To me, it is far more worrisome that the parent property is undefined.  We need to understand why that is the case.  Lots of other things could break due to that.  If you look at the component's element and check the element's parentNode, is it defined?  If so, then the parent getter should not be returning undefined.  Step into the parent getter and try to see why.

-Alex

On 5/1/18, 2:05 AM, "Piotr Zarzycki" <pi...@gmail.com> wrote:

    Alex,
    
    I did more experiments to that, but not sure whether it's ok. In those two
    places I had parent - undefined [1] (UIBase) [2] (ClassSelectorList). As
    you can see I commented out those condition and everything started to work
    properly.
    
    The question is - Why those condition even there here ? Did you or Carlos
    had and scenario where something was crashing without it ?
    
    [1] https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2FOTab&data=02%7C01%7Caharui%40adobe.com%7Ce2e3e44ca87a4d025c6208d5af42afdd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607623322558881&sdata=0qoiIUEIyA4DCoVF1BrHBSFVP1IOrLS9H95d35qwstk%3D&reserved=0
    [2] https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2FSv1K&data=02%7C01%7Caharui%40adobe.com%7Ce2e3e44ca87a4d025c6208d5af42afdd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607623322568889&sdata=G6T9atRqzQwDOtPEjp6mkGRUXZE%2FZy2yY%2F95leIPQXo%3D&reserved=0
    
    Thanks,
    Piotr
    
    2018-04-29 20:02 GMT+02:00 Piotr Zarzycki <pi...@gmail.com>:
    
    > Alex,
    >
    > I did look into that but unfortunately adding ClassListSelector didn't
    > change anything. Still setting className dynamically won't change it
    > because parent in UIBase is undefined. I did find that loop while was
    > infinite in some circumstances. I have pushed fix, not sure if it's
    > correct.
    >
    > You were saying that parent in your browser was not undefined. I did check
    > even on my Mac on Safari and in UIBase it's undefined all the time. Maybe
    > states are messing up with something and current system do not handle
    > everything as it was before.
    >
    > I updated website [1] with committed changes. Switching between sub pages
    > reproduce the issue.
    >
    > [1] https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftranspiledactionscript.com%2Fdev%2Fexamples%2F&data=02%7C01%7Caharui%40adobe.com%7Ce2e3e44ca87a4d025c6208d5af42afdd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607623322568889&sdata=9vrin7DQVxaTK94dnfZkTpL8s4LIbB7fte8E%2BkjHJKI%3D&reserved=0
    > TranspiledActionScript/
    >
    > Thanks,
    > Piotr
    >
    > 2018-04-29 11:25 GMT+02:00 Piotr Zarzycki <pi...@gmail.com>:
    >
    >> Hi Alex,
    >>
    >> Ok I will look into that.
    >>
    >> Thanks,
    >> Piotr
    >>
    >>
    >> On Sun, Apr 29, 2018, 8:12 AM Alex Harui <ah...@adobe.com.invalid>
    >> wrote:
    >>
    >>> Hi Piotr,
    >>>
    >>> For me, parent is not undefined when the new value of snippetBackground
    >>> is being applied.  The first time I debugged through the code it looked
    >>> like was undefined, but when I stepped through the parent getter it
    >>> returned a valid result.  I'm not sure if we can trust the value tooltips
    >>> for our getters.
    >>>
    >>> I think the problem is that I did not upgrade the className
    >>> implementation in MDL when I updated UIBase and the Jewel code.  MDL is
    >>> still using the ClassList class and it should probably do what Jewel is
    >>> doing and use ClassSelectorList instead.   I think if that works for MDL
    >>> then we can drop ClassList from the code base.
    >>>
    >>> I would like you to do the upgrade since it will be easier for you to
    >>> test it and make any further adjustments.
    >>>
    >>> Thanks,
    >>> -Alex
    >>>
    >>> On 4/28/18, 10:02 PM, "Alex Harui" <ah...@adobe.com.INVALID> wrote:
    >>>
    >>>     I will look into it.
    >>>
    >>>     On 4/28/18, 2:08 PM, "Carlos Rovira" <ca...@apache.org>
    >>> wrote:
    >>>
    >>>         Sorry but as I said I'm few days off so I can't look at it. Hope
    >>> you can
    >>>         see the root of the problem since I was planning to use states
    >>> in jewel
    >>>         example to do better organization of different examples
    >>>
    >>>
    >>>         El El sáb, 28 abr 2018 a las 9:58, Piotr Zarzycki <
    >>> piotrzarzycki21@gmail.com>
    >>>         escribió:
    >>>
    >>>         > Carlos,
    >>>         >
    >>>         > Any thoughts ? Maybe it make sense that parent is undefined
    >>> since view is
    >>>         > changing state - it's not added yet to the parent. We should
    >>> sort it out,
    >>>         > because I don't see any weird in my case. I'm just changing
    >>> className
    >>>         > dynamically. :)
    >>>         >
    >>>         > Thanks, Piotr
    >>>         >
    >>>         > 2018-04-28 9:54 GMT+02:00 piotrz <pi...@apache.org>:
    >>>         >
    >>>         > > DataBinding example is working fine, so it leads me to the
    >>> className
    >>>         > > property
    >>>         > > in UIBase. I have setup break point and it looks like
    >>> because this.parent
    >>>         > > is
    >>>         > > undefined className is not setup properly.
    >>>         > >
    >>>         > > Look into the screenshot. You can also setup breakpoint
    >>> yourself to see
    >>>         > > results.
    >>>         > >
    >>>         > > <https://na01.safelinks.protection.outlook.com/?url=http%3A%
    >>> 2F%2Fapache-royale-development.20373.n8.nabble&data=02%7C01%
    >>> 7Caharui%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa
    >>> 7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&
    >>> sdata=xdPoaM1ogtS7DFJsUOUEtPIq%2BpSYKYKcLNNrqjC3yKs%3D&reserved=0.
    >>>         > > com/file/t1/parent_undefined.png>
    >>>         > >
    >>>         > > Why it is even checked ? It was part of latest changes ?
    >>>         > >
    >>>         > > Thanks,
    >>>         > > Piotr
    >>>         > >
    >>>         > >
    >>>         > >
    >>>         > > --
    >>>         > > Sent from: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fna01.safelinks.protect&data=02%7C01%7Caharui%40adobe.com%7Ce2e3e44ca87a4d025c6208d5af42afdd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607623322568889&sdata=1rkdnaRxxnGWPpZ2XNVf4QxA11JPDyVVzIj0Cu3LXPU%3D&reserved=0
    >>> ion.outlook.com/?url=http%3A%2F%2Fapache-royale-development
    >>> .20373.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7
    >>> Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c1
    >>> 78decee1%7C0%7C0%7C636605465381823797&sdata=G4tLoCptxaRSh%2B
    >>> PZfCMahadW3RCiHPTH918xG5%2FO3Q0%3D&reserved=0
    >>>         > >
    >>>         >
    >>>         >
    >>>         >
    >>>         > --
    >>>         >
    >>>         > Piotr Zarzycki
    >>>         >
    >>>         > Patreon: *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fna01.safelinks.protec&data=02%7C01%7Caharui%40adobe.com%7Ce2e3e44ca87a4d025c6208d5af42afdd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607623322568889&sdata=b2MeJR7Kj2FiDzZBoy02d0ZPyVYgXBWCXdmt3cRKaZs%3D&reserved=0
    >>> tion.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiot
    >>> rzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ceea3fd5a126e40
    >>> aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
    >>> 7C0%7C636605465381823797&sdata=Sk%2BnEHPqRyaQ7vYVSeTnif
    >>> 0tactznUV1PxtqHn8kobg%3D&reserved=0
    >>>         > <https://na01.safelinks.protection.outlook.com/?url=https%
    >>> 3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharu
    >>> i%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7
    >>> b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&
    >>> sdata=Sk%2BnEHPqRyaQ7vYVSeTnif0tactznUV1PxtqHn8kobg%3D&reserved=0>*
    >>>         >
    >>>         --
    >>>         Carlos Rovira
    >>>         https://na01.safelinks.protection.outlook.com/?url=http%3A%
    >>> 2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.
    >>> com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794a
    >>> ed2c178decee1%7C0%7C0%7C636605465381823797&sdata=LZQiGYiUknr
    >>> mz7QOfTTLJheSdn3cm3XceN95hVidJv4%3D&reserved=0
    >>>
    >>>
    >>>
    >>>
    >>>
    >
    >
    > --
    >
    > Piotr Zarzycki
    >
    > Patreon: *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ce2e3e44ca87a4d025c6208d5af42afdd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607623322568889&sdata=t9nneCguO%2BFqQA8UcLcW4kFdWBWAJR1Gz9Wffsz6r%2F0%3D&reserved=0
    > <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ce2e3e44ca87a4d025c6208d5af42afdd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607623322568889&sdata=t9nneCguO%2BFqQA8UcLcW4kFdWBWAJR1Gz9Wffsz6r%2F0%3D&reserved=0>*
    >
    
    
    
    -- 
    
    Piotr Zarzycki
    
    Patreon: *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ce2e3e44ca87a4d025c6208d5af42afdd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607623322568889&sdata=t9nneCguO%2BFqQA8UcLcW4kFdWBWAJR1Gz9Wffsz6r%2F0%3D&reserved=0
    <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ce2e3e44ca87a4d025c6208d5af42afdd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636607623322568889&sdata=t9nneCguO%2BFqQA8UcLcW4kFdWBWAJR1Gz9Wffsz6r%2F0%3D&reserved=0>*
    


Re: States doesn't work properly anymore

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

I did more experiments to that, but not sure whether it's ok. In those two
places I had parent - undefined [1] (UIBase) [2] (ClassSelectorList). As
you can see I commented out those condition and everything started to work
properly.

The question is - Why those condition even there here ? Did you or Carlos
had and scenario where something was crashing without it ?

[1] https://paste.apache.org/OTab
[2] https://paste.apache.org/Sv1K

Thanks,
Piotr

2018-04-29 20:02 GMT+02:00 Piotr Zarzycki <pi...@gmail.com>:

> Alex,
>
> I did look into that but unfortunately adding ClassListSelector didn't
> change anything. Still setting className dynamically won't change it
> because parent in UIBase is undefined. I did find that loop while was
> infinite in some circumstances. I have pushed fix, not sure if it's
> correct.
>
> You were saying that parent in your browser was not undefined. I did check
> even on my Mac on Safari and in UIBase it's undefined all the time. Maybe
> states are messing up with something and current system do not handle
> everything as it was before.
>
> I updated website [1] with committed changes. Switching between sub pages
> reproduce the issue.
>
> [1] https://transpiledactionscript.com/dev/examples/
> TranspiledActionScript/
>
> Thanks,
> Piotr
>
> 2018-04-29 11:25 GMT+02:00 Piotr Zarzycki <pi...@gmail.com>:
>
>> Hi Alex,
>>
>> Ok I will look into that.
>>
>> Thanks,
>> Piotr
>>
>>
>> On Sun, Apr 29, 2018, 8:12 AM Alex Harui <ah...@adobe.com.invalid>
>> wrote:
>>
>>> Hi Piotr,
>>>
>>> For me, parent is not undefined when the new value of snippetBackground
>>> is being applied.  The first time I debugged through the code it looked
>>> like was undefined, but when I stepped through the parent getter it
>>> returned a valid result.  I'm not sure if we can trust the value tooltips
>>> for our getters.
>>>
>>> I think the problem is that I did not upgrade the className
>>> implementation in MDL when I updated UIBase and the Jewel code.  MDL is
>>> still using the ClassList class and it should probably do what Jewel is
>>> doing and use ClassSelectorList instead.   I think if that works for MDL
>>> then we can drop ClassList from the code base.
>>>
>>> I would like you to do the upgrade since it will be easier for you to
>>> test it and make any further adjustments.
>>>
>>> Thanks,
>>> -Alex
>>>
>>> On 4/28/18, 10:02 PM, "Alex Harui" <ah...@adobe.com.INVALID> wrote:
>>>
>>>     I will look into it.
>>>
>>>     On 4/28/18, 2:08 PM, "Carlos Rovira" <ca...@apache.org>
>>> wrote:
>>>
>>>         Sorry but as I said I'm few days off so I can't look at it. Hope
>>> you can
>>>         see the root of the problem since I was planning to use states
>>> in jewel
>>>         example to do better organization of different examples
>>>
>>>
>>>         El El sáb, 28 abr 2018 a las 9:58, Piotr Zarzycki <
>>> piotrzarzycki21@gmail.com>
>>>         escribió:
>>>
>>>         > Carlos,
>>>         >
>>>         > Any thoughts ? Maybe it make sense that parent is undefined
>>> since view is
>>>         > changing state - it's not added yet to the parent. We should
>>> sort it out,
>>>         > because I don't see any weird in my case. I'm just changing
>>> className
>>>         > dynamically. :)
>>>         >
>>>         > Thanks, Piotr
>>>         >
>>>         > 2018-04-28 9:54 GMT+02:00 piotrz <pi...@apache.org>:
>>>         >
>>>         > > DataBinding example is working fine, so it leads me to the
>>> className
>>>         > > property
>>>         > > in UIBase. I have setup break point and it looks like
>>> because this.parent
>>>         > > is
>>>         > > undefined className is not setup properly.
>>>         > >
>>>         > > Look into the screenshot. You can also setup breakpoint
>>> yourself to see
>>>         > > results.
>>>         > >
>>>         > > <https://na01.safelinks.protection.outlook.com/?url=http%3A%
>>> 2F%2Fapache-royale-development.20373.n8.nabble&data=02%7C01%
>>> 7Caharui%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa
>>> 7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&
>>> sdata=xdPoaM1ogtS7DFJsUOUEtPIq%2BpSYKYKcLNNrqjC3yKs%3D&reserved=0.
>>>         > > com/file/t1/parent_undefined.png>
>>>         > >
>>>         > > Why it is even checked ? It was part of latest changes ?
>>>         > >
>>>         > > Thanks,
>>>         > > Piotr
>>>         > >
>>>         > >
>>>         > >
>>>         > > --
>>>         > > Sent from: https://na01.safelinks.protect
>>> ion.outlook.com/?url=http%3A%2F%2Fapache-royale-development
>>> .20373.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7
>>> Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c1
>>> 78decee1%7C0%7C0%7C636605465381823797&sdata=G4tLoCptxaRSh%2B
>>> PZfCMahadW3RCiHPTH918xG5%2FO3Q0%3D&reserved=0
>>>         > >
>>>         >
>>>         >
>>>         >
>>>         > --
>>>         >
>>>         > Piotr Zarzycki
>>>         >
>>>         > Patreon: *https://na01.safelinks.protec
>>> tion.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiot
>>> rzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ceea3fd5a126e40
>>> aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>>> 7C0%7C636605465381823797&sdata=Sk%2BnEHPqRyaQ7vYVSeTnif
>>> 0tactznUV1PxtqHn8kobg%3D&reserved=0
>>>         > <https://na01.safelinks.protection.outlook.com/?url=https%
>>> 3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharu
>>> i%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7
>>> b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&
>>> sdata=Sk%2BnEHPqRyaQ7vYVSeTnif0tactznUV1PxtqHn8kobg%3D&reserved=0>*
>>>         >
>>>         --
>>>         Carlos Rovira
>>>         https://na01.safelinks.protection.outlook.com/?url=http%3A%
>>> 2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.
>>> com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794a
>>> ed2c178decee1%7C0%7C0%7C636605465381823797&sdata=LZQiGYiUknr
>>> mz7QOfTTLJheSdn3cm3XceN95hVidJv4%3D&reserved=0
>>>
>>>
>>>
>>>
>>>
>
>
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*
>



-- 

Piotr Zarzycki

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

Re: States doesn't work properly anymore

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

For me, parent is not undefined when the new value of snippetBackground is being applied.  The first time I debugged through the code it looked like was undefined, but when I stepped through the parent getter it returned a valid result.  I'm not sure if we can trust the value tooltips for our getters.

I think the problem is that I did not upgrade the className implementation in MDL when I updated UIBase and the Jewel code.  MDL is still using the ClassList class and it should probably do what Jewel is doing and use ClassSelectorList instead.   I think if that works for MDL then we can drop ClassList from the code base.

I would like you to do the upgrade since it will be easier for you to test it and make any further adjustments.

Thanks,
-Alex

On 4/28/18, 10:02 PM, "Alex Harui" <ah...@adobe.com.INVALID> wrote:

    I will look into it.
    
    On 4/28/18, 2:08 PM, "Carlos Rovira" <ca...@apache.org> wrote:
    
        Sorry but as I said I'm few days off so I can't look at it. Hope you can
        see the root of the problem since I was planning to use states in jewel
        example to do better organization of different examples
        
        
        El El sáb, 28 abr 2018 a las 9:58, Piotr Zarzycki <pi...@gmail.com>
        escribió:
        
        > Carlos,
        >
        > Any thoughts ? Maybe it make sense that parent is undefined since view is
        > changing state - it's not added yet to the parent. We should sort it out,
        > because I don't see any weird in my case. I'm just changing className
        > dynamically. :)
        >
        > Thanks, Piotr
        >
        > 2018-04-28 9:54 GMT+02:00 piotrz <pi...@apache.org>:
        >
        > > DataBinding example is working fine, so it leads me to the className
        > > property
        > > in UIBase. I have setup break point and it looks like because this.parent
        > > is
        > > undefined className is not setup properly.
        > >
        > > Look into the screenshot. You can also setup breakpoint yourself to see
        > > results.
        > >
        > > <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble&data=02%7C01%7Caharui%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&sdata=xdPoaM1ogtS7DFJsUOUEtPIq%2BpSYKYKcLNNrqjC3yKs%3D&reserved=0.
        > > com/file/t1/parent_undefined.png>
        > >
        > > Why it is even checked ? It was part of latest changes ?
        > >
        > > Thanks,
        > > Piotr
        > >
        > >
        > >
        > > --
        > > Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&sdata=G4tLoCptxaRSh%2BPZfCMahadW3RCiHPTH918xG5%2FO3Q0%3D&reserved=0
        > >
        >
        >
        >
        > --
        >
        > Piotr Zarzycki
        >
        > Patreon: *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&sdata=Sk%2BnEHPqRyaQ7vYVSeTnif0tactznUV1PxtqHn8kobg%3D&reserved=0
        > <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&sdata=Sk%2BnEHPqRyaQ7vYVSeTnif0tactznUV1PxtqHn8kobg%3D&reserved=0>*
        >
        -- 
        Carlos Rovira
        https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&sdata=LZQiGYiUknrmz7QOfTTLJheSdn3cm3XceN95hVidJv4%3D&reserved=0
        
    
    


Re: States doesn't work properly anymore

Posted by Alex Harui <ah...@adobe.com.INVALID>.
I will look into it.

On 4/28/18, 2:08 PM, "Carlos Rovira" <ca...@apache.org> wrote:

    Sorry but as I said I'm few days off so I can't look at it. Hope you can
    see the root of the problem since I was planning to use states in jewel
    example to do better organization of different examples
    
    
    El El sáb, 28 abr 2018 a las 9:58, Piotr Zarzycki <pi...@gmail.com>
    escribió:
    
    > Carlos,
    >
    > Any thoughts ? Maybe it make sense that parent is undefined since view is
    > changing state - it's not added yet to the parent. We should sort it out,
    > because I don't see any weird in my case. I'm just changing className
    > dynamically. :)
    >
    > Thanks, Piotr
    >
    > 2018-04-28 9:54 GMT+02:00 piotrz <pi...@apache.org>:
    >
    > > DataBinding example is working fine, so it leads me to the className
    > > property
    > > in UIBase. I have setup break point and it looks like because this.parent
    > > is
    > > undefined className is not setup properly.
    > >
    > > Look into the screenshot. You can also setup breakpoint yourself to see
    > > results.
    > >
    > > <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble&data=02%7C01%7Caharui%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&sdata=xdPoaM1ogtS7DFJsUOUEtPIq%2BpSYKYKcLNNrqjC3yKs%3D&reserved=0.
    > > com/file/t1/parent_undefined.png>
    > >
    > > Why it is even checked ? It was part of latest changes ?
    > >
    > > Thanks,
    > > Piotr
    > >
    > >
    > >
    > > --
    > > Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&sdata=G4tLoCptxaRSh%2BPZfCMahadW3RCiHPTH918xG5%2FO3Q0%3D&reserved=0
    > >
    >
    >
    >
    > --
    >
    > Piotr Zarzycki
    >
    > Patreon: *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&sdata=Sk%2BnEHPqRyaQ7vYVSeTnif0tactznUV1PxtqHn8kobg%3D&reserved=0
    > <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&sdata=Sk%2BnEHPqRyaQ7vYVSeTnif0tactznUV1PxtqHn8kobg%3D&reserved=0>*
    >
    -- 
    Carlos Rovira
    https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ceea3fd5a126e40aa7bc108d5ad4c3ba8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636605465381823797&sdata=LZQiGYiUknrmz7QOfTTLJheSdn3cm3XceN95hVidJv4%3D&reserved=0
    


Re: States doesn't work properly anymore

Posted by Carlos Rovira <ca...@apache.org>.
Sorry but as I said I'm few days off so I can't look at it. Hope you can
see the root of the problem since I was planning to use states in jewel
example to do better organization of different examples


El El sáb, 28 abr 2018 a las 9:58, Piotr Zarzycki <pi...@gmail.com>
escribió:

> Carlos,
>
> Any thoughts ? Maybe it make sense that parent is undefined since view is
> changing state - it's not added yet to the parent. We should sort it out,
> because I don't see any weird in my case. I'm just changing className
> dynamically. :)
>
> Thanks, Piotr
>
> 2018-04-28 9:54 GMT+02:00 piotrz <pi...@apache.org>:
>
> > DataBinding example is working fine, so it leads me to the className
> > property
> > in UIBase. I have setup break point and it looks like because this.parent
> > is
> > undefined className is not setup properly.
> >
> > Look into the screenshot. You can also setup breakpoint yourself to see
> > results.
> >
> > <http://apache-royale-development.20373.n8.nabble.
> > com/file/t1/parent_undefined.png>
> >
> > Why it is even checked ? It was part of latest changes ?
> >
> > Thanks,
> > Piotr
> >
> >
> >
> > --
> > Sent from: http://apache-royale-development.20373.n8.nabble.com/
> >
>
>
>
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*
>
-- 
Carlos Rovira
http://about.me/carlosrovira

Re: States doesn't work properly anymore

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

Any thoughts ? Maybe it make sense that parent is undefined since view is
changing state - it's not added yet to the parent. We should sort it out,
because I don't see any weird in my case. I'm just changing className
dynamically. :)

Thanks, Piotr

2018-04-28 9:54 GMT+02:00 piotrz <pi...@apache.org>:

> DataBinding example is working fine, so it leads me to the className
> property
> in UIBase. I have setup break point and it looks like because this.parent
> is
> undefined className is not setup properly.
>
> Look into the screenshot. You can also setup breakpoint yourself to see
> results.
>
> <http://apache-royale-development.20373.n8.nabble.
> com/file/t1/parent_undefined.png>
>
> Why it is even checked ? It was part of latest changes ?
>
> Thanks,
> Piotr
>
>
>
> --
> Sent from: http://apache-royale-development.20373.n8.nabble.com/
>



-- 

Piotr Zarzycki

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

Re: States doesn't work properly anymore

Posted by piotrz <pi...@apache.org>.
DataBinding example is working fine, so it leads me to the className property
in UIBase. I have setup break point and it looks like because this.parent is
undefined className is not setup properly. 

Look into the screenshot. You can also setup breakpoint yourself to see
results. 

<http://apache-royale-development.20373.n8.nabble.com/file/t1/parent_undefined.png> 

Why it is even checked ? It was part of latest changes ? 

Thanks,
Piotr



--
Sent from: http://apache-royale-development.20373.n8.nabble.com/

Re: States doesn't work properly anymore

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Try DataBindingExample.  The checkbox should cause a TextArea to appear and disappear.

-Alex

On 4/27/18, 1:08 PM, "Piotr Zarzycki" <pi...@gmail.com> wrote:

    Hi Guys,
    
    I've been working on some update to my TranspiledActionScript website. I
    have noticed that with current version of Nightly builds states are not
    working properly.
    
    I uploaded copy of my website here [1].
    
    If you switch view from "Examples" to "Snippets" you should see that
    background is not changing at all. You can see how it should work correctly
    on the main page [2].
    
    I'm basically changing classes using states - code responsible for that is
    here [3]. I will look tomorrow whether className changes causes that or
    something else.
    
    Just wanted to report here that issue.
    
    [1] https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftranspiledactionscript.com%2Fdev%2Fexamples%2FTranspiledActionScript%2F&data=02%7C01%7Caharui%40adobe.com%7Ceb295cc3e58b4d9afe8108d5ac7a8d63%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636604564808614520&sdata=wpvPLuoaI6LKv21TFc8%2BU1FpaM0cH2l7fg5oVKs%2BXDA%3D&reserved=0
    [2] https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftranspiledactionscript.com%2F&data=02%7C01%7Caharui%40adobe.com%7Ceb295cc3e58b4d9afe8108d5ac7a8d63%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636604564808614520&sdata=eMuo2YOTXW22aIXYGk9wkHPxpkqH7UIeDrVwcV8LiDc%3D&reserved=0
    [3] https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbit.ly%2F2HzZDXo&data=02%7C01%7Caharui%40adobe.com%7Ceb295cc3e58b4d9afe8108d5ac7a8d63%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636604564808614520&sdata=tYPRGDsG2dDXm8hQw3R%2BwlcltJ8F684rcSb4uwRlojc%3D&reserved=0
    
    Thanks,
    -- 
    
    Piotr Zarzycki
    
    Patreon: *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ceb295cc3e58b4d9afe8108d5ac7a8d63%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636604564808624527&sdata=2W2yJmHcRgrJhEfVgxK6Dytsf%2BQmnMzRyPF54HAAdQM%3D&reserved=0
    <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Ceb295cc3e58b4d9afe8108d5ac7a8d63%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636604564808624527&sdata=2W2yJmHcRgrJhEfVgxK6Dytsf%2BQmnMzRyPF54HAAdQM%3D&reserved=0>*