Hey, looks like the compiler is already emitting id binders for datasets
<dataset name="foo" src="http:test.xml"/>
LzInstantiateView({attrs: {$lzc$bind_name:
/* -*- file: dataset.lzx#3.85 -*- */
function ($lzc$node:LzNode, $lzc$bind:Boolean = true) {
if ($lzc$bind) {
foo = $lzc$node
} else {
if (foo === $lzc$node) {
foo = null
}}}, name: "foo", src: "http:test.xml"}, name: "dataset"}, 1);
For compile-time data sets, I modified the compiler to add a "var
datasetname = "... before the call to lzAddLocaData, so that will
get compiled into a global as well.
<dataset name="bar" src="test.xml"/>
used to compiler to
lzAddLocalData("bar", "<data><flavors>\r\n <flavor>chocolate</flavor>\r\n
<flavor>vanilla</flavor>\r\n</flavors></data>", false);}
now compiles to
var bar = lzAddLocalData("bar", "<data><flavors>\r\n
<flavor>chocolate</flavor>\r\n
<flavor>vanilla</flavor>\r\n</flavors></data>", false);}
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]