[Laszlo-user] endless subview instantiation process when done in the parent' oninit event

slai@laszlosystems.com slai at laszlosystems.com
Fri Jun 30 11:52:30 EDT 2006


Hi,

I am not sure is this an expected behavior or not

I try to create ONE child (subview) in oninit() event.
I am not sure why this is become an endless process.
There's no sign of compiler or runtime warning after running the
application.

thanks.

Sanjaya
I have LPS 3.3.1
Windows XP Pro
Firefox 1.5.x

==testcase==

<canvas debug="true">

      <view name="parent">
          <simplelayout axis="y" spacing="10" />
          <text text="why am I keep creating child without any warning"
/>

          <handler name="oninit">

                   var anarr = new Array();
                   var lbl = "child ["+(this.subviews.length-1)+"]";

                   anarr.push({ name:"LzText",
                                attrs: {text: lbl}});

                   this.createChildren(anarr);

                   Debug.write("created child lbl="+lbl);
          </handler>
      </view>
</canvas>



More information about the Laszlo-user mailing list