[Laszlo-dev] States example
Lou Iorio
liorio at laszlosystems.com
Thu Nov 8 03:51:04 PST 2007
In Chapter 32. States, example 32.5. Using setters in <state>
attributes:
<canvas debug="true">
<class name="testState" extends="state">
<attribute name="countApplies" value="0"
setter="this.countApplies = countApplies"/>
<method name="apply">
this.setAttribute('countApplies', ++this.countApplies);
super.apply();
</method>
</class>
<button >Try it
<handler name="onclick">
ts.apply();
Debug.write("applies:" + ts.countApplies);
ts.remove();
</handler>
<testState name="ts"/>
</button>
</canvas>
The compiler complains:
states-$5.lzx:3:43: In class 'testState' attribute 'apply' with type
'method' is overriding superclass attribute with same name but
different type: expression
This example worked in OL 3.4. What do I do to make this error go away?
Thanks,
Lou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20071108/d63d7e79/attachment.html
More information about the Laszlo-dev
mailing list