I should point out that made the return value a simple int rather than
an object with a stopObserving function.

It would be quite easy to add, simply change (in EventCache.observe):
  return this.cacheIndex;
to:
  return {stopObserving: EventCache.stopObserving.bind(this,
this.cacheIndex)};

But, I don't think the overhead of a bind call and the storage of an
object with a function for EACH event observed is justifiable, just to
have the convenience of:
  handle.stopObserving();
rather than:
  Event.stopObserving(handle);

I seriously deal with cases that use thousands of event observers,
sometimes created in a short period of time, so this API needs to be
as efficient as possible.

As an aside, I just realized that this reply box in Google Groups has
a textarea that is resizable by dragging! Cool..

Colin


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to