[Laszlo-dev] it looks like data set compiler is already emitting the correct id binder, for http datasets
P T Withington
ptw at laszlosystems.com
Wed Apr 16 05:35:25 PDT 2008
Yup. Max found it: http://jira.openlaszlo.org/jira/browse/LPP-5782
On 2008-04-15, at 15:47 EDT, Henry Minsky wrote:
> Hmm , actually in swf8, the warnings show up for every node that has
> an id,
> whether it is a dataset or a view or whatever.
> So maybe it is some artifact of the swf8 debug code?
>
>
>
>
>
>
> On Tue, Apr 15, 2008 at 3:39 PM, P T Withington
> <ptw at laszlosystems.com>
> wrote:
>
>> Ah, so it was just that the local datasets were not installing
>> themselves?
>>
>>
>> On 2008-04-15, at 15:24 EDT, Henry Minsky wrote:
>>
>>> 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
>>> hminsky at laszlosystems.com
>>>
>>
>>
>
>
> --
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com
More information about the Laszlo-dev
mailing list