rpc-$12.lzx
<canvas debug="true" width="100%">
<simplelayout spacing="5"/>
<method name="v2e" args="v">
Debug.debug('Got %w', v);
var de = LzDataElement.valueToElement(v);
Debug.debug("%w", de.serialize());
</method>
<button text="number">
<handler name="onclick">
var num = 5;
canvas.v2e(num);
</handler>
</button>
<button text="string">
<handler name="onclick">
var str = "a string";
canvas.v2e(str);
</handler>
</button>
<button text="array">
<handler name="onclick">
var arr = [1, 2, 3];
canvas.v2e(arr);
</handler>
</button>
<button text="object">
<handler name="onclick">
var obj = { p1: "a string", p2: 5 }
canvas.v2e(obj);
</handler>
</button>
<button text="complex array">
<handler name="onclick">
var arr = [ 1, { p1: "a string", p2: 5 }, [ 1, 2, 3] ];
canvas.v2e(arr);
</handler>
</button>
<button text="complex object">
<handler name="onclick">
var obj = { p1: [1, 2, 3], p2: 5 };
canvas.v2e(obj);
</handler>
</button>
</canvas>
Cross References
Named Instances