From: Alex T. <al...@tw...> - 2005-12-16 10:41:22
|
Don Taylor wrote: > Alex Tweedly wrote: > >> - has a drop-down for all controls in the current file >> Selecting one of them makes another drop-down appear. >> This shows all events for that control type, with a "+" marking >> those for which a handler exists. >> <etc.> > > > Oh, this looks very handy indeed. Thanks. > > What about a facility for adding background event handlers too? I > initialize mentioned in a tutorial, but I can't find a refernce to any > others. > They aren't used all that often (or at least, I don't use them that often). They aren't true "background" handlers in the Hypercard sense, so you need to be careful (though given that I've never used Hypercard, my interpretation may be slightly off ....) You can create a handler, say on_mouseMove. If there is a component which could have had a mouseMove handler, but doesn't, then those events go to the "background" handler instead. But there is no mouseMove event generated when the mouse is moved while not over any component, nor while over a component that doesn't support mouseMove. Since the code inserted is so minimal, I'm not sure it's worth adding a method to insert background handlers - easy enough to do manually, or to add a handler to a component and remove the component name (i.e. edit "on_someComponent_event" to be just "on_event") -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.1/204 - Release Date: 15/12/2005 |