[Laszlo-user] change parent of a subview

Can Barışcan canbarcan at gmail.com
Wed Jun 13 06:04:07 PDT 2007


In the forum I've seen someone say : you can't change parent dynamically.
Oh well.  I'll try to hack it in some other way.

On 6/13/07, Can Barışcan <canbarcan at gmail.com> wrote:
>
> How can I change the parent of a view within a view that has a layout? I
> have something that is inited in a view and placed according to a layout.
> Instead of destroying it, I want to hide it and put it in an invisible view
> (restoring the layout for the remaining elements).  Then when I want to show
> it again, I want to put it back inside the layout but like it was added from
> scratch like a new thing was added to the layout, so this way I don't have
> to destroy, then initialize it again each time I virtually close and open
> it. Opening puts things according to layout..  Like windows.subviews[1].setParent(windowstack)
> then windowstack.subviews[1].setParent(windows).
>
> It says in docs chapter 32 states:
>
> "This example highlights the metaphysical nature of states: they modify
> the meta-object protocol enough so that their contents can be stored and
> applied elsewhere. (This could conceivably be a feature of the system as a
> whole as in, for example, an LzNode.setParent(otherLzNode), but it's
> not)."
>
> I don't really get this.
>
> Can
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20070613/c2c2f608/attachment.html


More information about the Laszlo-user mailing list