If I have a bunch of instances of data-bound views (or class instances)
that access the object's .data property. This is not a documented field
in LzView or LzNode but I started using it when I caught [ondata]
events. See example below.
My question is.... is it safe to refer to the data property of a
data-bound view? If so, I'll log a LPP bug that it should be documented.
Thanks!
-e
<canvas height="500" debug="true">
<dataset name="ds">
<item name="Harry" />
<item name="Ron" />
<item name="Hermione" />
</dataset>
<button text="set data one"
onclick="myview.setDatapath('ds:/item[1]')" />
<button text="set data many" onclick="myview.setDatapath('ds:/item')" />
<view name="myview">
<datapath />
<handler name="ondata" args="d">
// code does stuff based on this.data here
Debug.write("ondata", d, this.data);
</handler>
<text datapath="@name" />
</view>
<simplelayout />
</canvas>