Ok I've managed to do what I wanted to do.

Paulo,yeah I've realized that and played with layouts  so I have custom
simple layout that can take an attribute if you want things inversely
positioned, and also if you want the layouts to be animated, and an
attribute if the layouts are not going to change only look at the last
elements position (simplelayout counts every subview when something added).

To solve my problem what I did is use layout.setLayoutOrder(lastview in
layout, view added to layout). But the lastview of the layout is not
view.subViews[subviews.length-1] when I change their positions with
setLayoutOrder, so I have set a variable that will keep the location of the
last positioned  subview in the subviews[] array.

This way I can virtually hide things in a layout, then add things to layout
and then put the hidden things in front when they are revealed again, then
add things in the layout again.

Why I did this? I don't want to  destroy()  then call  new className(parent,
{attributes});  everytime I want to remove a subview from a view within a
layout and add the same thing again. That's how it was before.

Thanks for all help,
Can

On 6/13/07, Benjamin Shine <[EMAIL PROTECTED]> wrote:


On Jun 13, 2007, at 5:33 AM, Can Barışcan wrote:
>
> 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.

Me neither! This paragraph is filed as issue LPP-668, http://
jira.openlaszlo.org/jira/browse/LPP-668
I suggest ignoring it. Consider it a flight of fancy.

-ben

Benjamin Shine
Software Engineer, Open Laszlo / Laszlo Systems
[EMAIL PROTECTED]




Reply via email to