Trevor, I believe that you are correct, the menu items are not injected into the page until they are first required. It may be that they are removed from the DOM when hidden as well, but I don't think they are recreated entirely so any event handlers attached should still work once they have been initially attached.
I like the general idea of this. I recently had to work with Sencha Touch and the new version (version 2 still in preview release) has a great implementation of the 'controller' part of model-view-controller. It attaches event handlers to element selectors that exist now or at any time, much like the jQuery.live() method works. I'm not sure if there is a mootools equivalent but it might fix the problem for you (at least the initial problem).
From what I recall of this thread, the general point of pain you are trying to remove is the necessity to have several handlers registered in several different ways for essentially the same thing, i.e. a toolbar button, a menu item and a keyboard shortcut. This seems like a common pattern for web applications. Perhaps an alternate approach would be to define a kind of factory/controller object which could be used to register handler functions and generate widgets that trigger the associated handler. Pseudo code for discussion:
function saveFile() {
// do something
}
factory.register('saveFile', {
handler: saveFile,
label: 'Save File',
/* any other options relevant to buttons and menu items */
keyboard: 'ctrl-s'
});
myMenu.add(factory.get('saveFile', 'button'));
myToolbar.add(factory.get('saveFile', 'menuItem));
factory.enable('saveFile'); /* enables all widgets and keyboard handlers */
factory.disable('saveFile'); /* disables all widgets and keyboard handlers */
We'd need to think through the API a bit but I think this is enough for discussion :)
Cheers
Paul