I keep running into weird behavior where attributes aren't initialized
when I expect.  Here's an example that doesn't work, although it seems
like it should.  Basically, I'm storing a reference to "cuteView" in
the "storeView" attribute of the Bug class.  Yet, you'll see that
bugInstance.storeView is null at the time the script is invoked.  Can
someone please elucidate why this doesn't work?

<canvas debug="true">
        <class name="Bug">
                <attribute name="storeView" type="expression"/>
        </class>
        <view name="cuteView"/>
        <Bug name="bugInstance" storeView="$once{parent.cuteView}"/>
        
        <script>        
                Debug.write(bugInstance.storeView);
                bugInstance.storeView.setAttribute("x",2);
        </script>
</canvas>
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to