Cute.
The compiler should have complained about the dataset class having
both and event and an attribute of the same name. But, perhaps one
or the other was not declared?
On 2007-04-25, at 18:12 EDT, Pablo Kang wrote:
I spent a good two hours tracking down why I was getting two
dataset ontimeouts when I finally figured out that the event was
overloaded. The ontimeout event can be sent when setting the
timeout attribute (which sends a number) and also when the call
times out (which sends the dataset).
Here's a simple example demonstrating the problem:
<canvas proxied="false" debug="true">
<dataset name="mydset" src="http://foobar.timeout"
oninit="this.setAttribute('timeout', 1000);
this.doRequest()"/>
<handler name="ontimeout" args="ds" reference="mydset">
// Be careful! ds is the dataset whose request timed out, but
// can also be a number when setting the timeout attribute.
Debug.write('mydset got timeout:', ds);
</handler>
</canvas>
pablo