Hello,
How can I remove all events from any component?
var myEvent = $$(“botonAceptar”).attachEvent(“onItemClick”, function (){ … })
always returns myEvent = true, but not an object.
If I need to attach 2 events, I only will detach one of them, becouse I invoke in any case detachEvent(true),that only remove one of them, and even if I invoke detach twice, always one of them is never detached…
thank you
javi.
pd.- (I´m using 2011 November 14 touchui_debug.js version)
viewtopic.php?f=4&t=20429&p=86805#p86805
Alexandra said
(Mon Sep 19, 2011 11:10)
“You may use detachAllEvents method: toolbar.detachAllEvents();”
(Tue Sep 20, 2011 11:40 am )
“This method is not public. Public methods are attachEvent and detachEvent which removes a certain event:
var ev = toolbar.attachEvent(“onClick”,handler);
toolbar.detachEvent(ev);”
but:
TypeError: $$(“botonAceptar”).detachAllEvents is not a function