rpc-javarpc-$2.lzx
<canvas debug="true" width="100%">
<security>
<allow>
<pattern>^examples\.ConstructExample</pattern>
</allow>
</security>
<javarpc name="ce" scope="session" autoload="false" remoteclassname="examples.ConstructExample" createargs="[1, 'a string', 1.45]">
<handler name="onerror" args="err">
Debug.debug("----------");
Debug.debug("onerror: %w", err)
</handler>
<handler name="onload">
Debug.debug("----------");
Debug.debug("constructed with %w", this.createargs);
Debug.debug("%w", this.proxy);
</handler>
</javarpc>
<simplelayout inset="10" spacing="5"/>
<button x="10" text="construct">
<handler name="onclick">
canvas.ce.load();
</handler>
</button>
<button x="10" text="getinfo">
<handler name="onclick">
this.getInfo.invoke();
</handler>
<remotecall funcname="getInfo" remotecontext="$once{canvas.ce}">
<handler name="ondata" args="res">
Debug.debug("----------");
Debug.debug("method: %w", this.name)
Debug.debug("return type: %w", typeof(res))
Debug.debug("return value: %w", res);
</handler>
</remotecall>
</button>
</canvas>
Cross References
Named Instances