> For example, I generate a table with a template.  That table might
> include links in the headers to sort by each column. I have a template
> macro that creates those links, and the macro has a flag to indicate
> if it should also generate the code for an ajax request.  The IDs are
> generated on the fly, so I don't know them ahead of time, and I don't
> know which or how many links will have events until the page is
> generated.

In that case, there has to still be a point when you are wiring up the
events that you have a chance to store information about those DOM
elements in some scope-wide variable (or array or what-have-you). 

Like "this.DOMElements.push(el);" and
"this.DOMEventHandlers.push(handler);"... and then in the dispose phase,
iterate those collections to get rid of the event handlers. 

The information transmitted in this electronic mail is intended only for the
person or entity to which it is addressed and may contain confidential,
proprietary, and/or privileged material.  Any review, retransmission, 
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from all computers.

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to