Hi Curtis, > According to the current 2.0 SDK Developers Guide (680m105), section > 13.8 - Scripting and Events, the XEventAttacherManager *IS* the only > effective way we're supposed to use script to programmatically attach > script to component events. According to section 13.9.4, directly > creating and attaching Listeners creates too many problems with the > scripting environment.
Oh, that's the forth one :-P It's not as absolutely bad as it sounds. Yes, the XEventAttacherManager is the only way to attach events to a form component, in a persistent way. There's no other way than this, except attaching it at runtime (say, in an OnLoad event of the document), but this is not really what I'd call "persistent". So, all fine so far. (Well, except that the syntax of the script event descriptors changed after I wrote that chapter, which pisses me off a little bit. But the old syntax, as described in the DevGuide, still works.) However, if we interpret "components" somewhat broader (which is what I was implicitly doing in my previous mail), than there's more than this. - Controls in Basic dialogs also have the possibility to attach macros to certain events. I know that they do not use the XEventAttacherManager for this, but I am not sure what kind of API they use (and I am too lazy to read all those pages in the DevGuide to find out right now) - Certain other objects in documents (such as a shape in, say, a presentation) can also have events/macros associated with them (for instance some mouse-move or so). AFAIK (I might be wrong), they also do not use the XEventAttacherManager for this, but yet another API. So, the three methods I was referring to were the XEventAttacherManager for form components, and the two above for things completely unrelated for form components. So: use the XEventAttacherManager, it works fine, it will continue to work, and there's nothing else at the moment. BUT, if we are ever going to touch this thing, and extend it with some new features, we should have a *very* close look at the other two event-attaching-related APIs, and see if there's room for consolidation. Ciao Frank -- - Frank Sch�nheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Database http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
