PDA

View Full Version : Is it appropriate to attach events using Ext.fly?



BigSeanDawg
3 Aug 2010, 10:06 AM
Hi, I just had a quick question of whether or not it is good practice to attach click events (or any other events) using Ext.fly(). I haven't had issues yet, but I'm worried that perhaps the on() method is storing a reference to the flyweight, and that this is potentially bad.

Any pointers is greatly appreciated. Thanks!

-Sean

Condor
4 Aug 2010, 12:45 AM
It's perfectly safe. The reference is stored in the Ext.EventManager and not in the Ext.Element.Flyweight.

BigSeanDawg
4 Aug 2010, 6:39 AM
Excellent. Thank you!