[Prototype-core] Re: True Hashes using objects as keys

2009-10-05 Thread dabeersk
Here's a use case: I have objects that register themselves as listeners for system notifications. When an object registers, I want to make sure we don't add that object twice. If the listener list is an array, then I have to iterate through the array every time we add a listener, which is expensi

[Prototype-core] Re: Event#element deprecated?

2009-10-05 Thread T.J. Crowder
> I had no idea it's deprecated. Isn't it a bit weird to use > `findElement` without arguments to get target element? Especially as all it does is call Event#element (in that case). Yes, I find that a bit weird. -- T.J. On Oct 5, 6:45 pm, kangax wrote: > On Oct 5, 11:55 am, Ngan wrote: > > >

[Prototype-core] Re: Event#element deprecated?

2009-10-05 Thread kangax
On Oct 5, 11:55 am, Ngan wrote: > Hi everyone, > > In the new docs, it says that Event#element is deprecated.  Is there a > reason for this? The doc says to use Event#findElement instead. I had no idea it's deprecated. Isn't it a bit weird to use `findElement` without arguments to get target ele

[Prototype-core] Event#element deprecated?

2009-10-05 Thread Ngan
Hi everyone, In the new docs, it says that Event#element is deprecated. Is there a reason for this? The doc says to use Event#findElement instead. However, this doesn't give you the exact element the effect originated from. Or are we having to go back to using target and srcElement? Thanks! --

[Prototype-core] Re: Event#element deprecated?

2009-10-05 Thread Ngan Pham
I just found out that Event#findElement == Event#element if no arguments are passed in. On Mon, Oct 5, 2009 at 8:55 AM, Ngan wrote: > > Hi everyone, > > In the new docs, it says that Event#element is deprecated. Is there a > reason for this? The doc says to use Event#findElement instead. > Howev