[Laszlo-user] extending <dataset>
P T Withington
ptw at openlaszlo.org
Thu Sep 13 05:16:18 PDT 2007
This is not just the usual "dataset body is data" issue? That the
<data> tag is meant to solve?
On 2007-09-13, at 08:08 EDT, Henry Minsky wrote:
> That's some sort of bug in the compiler, you can workaround it for now
> if you say
>
> <canvas validate="false">
>
> or else retrieve the app with validate=false in the query args
>
> although this has the unfortunate side effect of disabling some
> useful warnings.
> There's already a bug filed for this I think, I will try to find it
> and annotate it with your test case.
>
>
>
>
>
>
>
> On 9/13/07, Vincent de Phily <vdephily at bluemetrix.com> wrote:
>> Hi list,
>>
>> I want to extend the dataset class, here's a simplified example :
>>
>>
>> <canvas>
>> <class name="mydataset" extends="dataset" type="http"
>> onerror="Debug.error('While fetching', this.src, ':',
>> this.getErrorString());"
>> ontimeout="Debug.error('While fetching', this.src, ':
>> timeout');"
>> ondata="Debug.write('Sucessfully fetched', this.src);"/>
>>
>> <mydataset name="ds1" src="data.xml" request="true">
>> <method name="doStuff">
>> Debug.write('stuff done');
>> </method>
>> </mydataset>
>>
>> <script>
>> new mydataset(canvas, {name:'ds2', src:'data2.xml',
>> request:true});
>> </script>
>> </canvas>
>>
>>
>> It works fine, except that I get a compiler warning when using the
>> 'mydataset'
>> tag (as opposed to creating it via script) :
>>> extenddataset.lzx:7:57: element "mydataset" not allowed in this
>>> context.
>>> Check whether it is spelled correctly, and whether a class with
>>> this name
>>> exists.
>>
>> Using recent builds of legals/waflecone, swf7 target.
>>
>>
>> Any idea to shut the warning up ?
>> --
>> Vincent de Phily
>>
>
>
> --
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com
More information about the Laszlo-user
mailing list