Remove all events from Toolbar?

Is there a method to remove all events from the Toolbar? Or an array of all the events currently attached to an event on the Toolbar?

I am building an app where there is one Toolbar shared among many different modules. Each module needs to be able to attach events to the Toolbar. I can attach new events to the Toolbar from these modules, but I am unable to find a good way to remove all previous events or to reset the Toolbar.

Any thoughts would be helpful. Thank you!

Instead of trying to remove the events I was able to get it to work by detaching the Toolbar from the layout object with detachToolbar();

You may use detachAllEvents method:

toolbar.detachAllEvents();

That would be a great method to use. Is that method new? I dont see it documented here:

docs.dhtmlx.com/doku.php?id=dhtm … _toc_alpha

Thank you!

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);

TypeError: $$(“botonAceptar”).detachAllEvents is not a function

(I´m using 2011 November 14 touchui_debug.js version)

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…

How can I remove all events from any component?

thank you