From: Robert R. <rra...@ya...> - 2000-12-10 05:45:28
|
You need a reference to the eventlistener object and then you call removeEventListener(listenerobj); One way is something like: MyWidget.listener = new EventListener() MyWidget.oncreate = function(e) { var o = e.getSource(); .... } MyWidget.prototype.dosomething = function() { if (...) this.addEventListener(MyWidget.listener); else this.removeEventListener(MyWiget.Listener(); } -- // Robert Rainwater On 12/9/2000, 7:32:25 PM EST, Raymond wrote about "[Dynapi-Dev] Adding/Removing Event Layers": > Bit stumped by this one. Trying to emulate dragevent > (attachable/unattachable behavior) within a Widget without having to write > the eventhandler as a separate ext. I've tried alot of different reference > scenarios to remove a created dynevent events handler nested in a DynLayer > attached to a parent layer. How can I unattach and reattach this > dynamically? > Thanks > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |