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 <[email protected]>:
> 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" <[email protected]> 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 <[email protected]
> >
> 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 <[email protected]>
> 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" <[email protected]> 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>*