[Laszlo-dev] For Review: Change change.YnPVbvuCF.txt Summary: Rewrite LzTimer to use setInterval/clearInterval instead of LzIdle
Jim Grandy
jgrandy at openlaszlo.org
Wed Jun 28 13:22:50 EDT 2006
On Jun 28, 2006, at 10:15 AM, Max Carlson wrote:
>>> I'm confused. How can this work: `this.timerList[d]` (where d
>>> is a delegate, hence an object?)
>>>
>> Hrm? It certainly does work. You can use any object as a key in
>> JavaScript, no?
>
> My understanding is, the object will get coerced to a string since
> object keys must be strings. This only works if the object being
> used as a key has a toString() method that returns something unique
> per instance.
Ah, interesting. I'll write a test, and expect it to fail :-)
If that doesn't work, then perhaps I should consider storing the
timer array with the "delegate" (which, remember, doesn't have to be
an LzDelegate). I feel a little uncomfortable with the idea of adding
a slot to an arbitrary object, but it's a clean solution in this
case. Opinions?
jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20060628/a5da5cb5/attachment-0001.html
More information about the Laszlo-dev
mailing list