Can you explain why this is necessary? Why create a strand with bead X and 
replace it with bead Y in runtime?

If your strand is using loadBeadFromValuesManager() it should be able to 
receive a null css class reference, like in this example.

https://github.com/yishayw/Examples/tree/RunTimeLayout


From: Carlos Rovira<mailto:carlosrov...@apache.org>
Sent: Sunday, January 27, 2019 10:26 AM
To: dev@royale.apache.org<mailto:dev@royale.apache.org>
Subject: Problems dealing with bead substitution in Royale

Hi,

Piotr and I found a situation where we don't know how to solve with some
generalist solution. Hope others here could give some ideas.

The setup: We have a layout bead that decorates the strand with a css class
selector. The bead is configured in CSS as a default bead

The problem: We found that adding another layout bead at runtime that
"substitute" the default bead and adds other CSS class selector, left the
selector(s) from the old layout bead untouched.

Notice that adding the new layout bead in MXML through beads array is ok,
since (I think) default bead is never instantiated and the second one is
the only one running its code. The problem happens if we try to do the
change at runtime at a later time.

So, our question is: How to deal with beads that are already instantiated
and needs to be removed. How we should operate with it? Should be have some
removal mechanism in Royale to do this?

For more info and code about this issue, Piotr shared some source code in
other recent thread about Jewel Group.

Thanks

--
Carlos Rovira
http://about.me/carlosrovira

Reply via email to