Hi Ariel, > FIRST of all, I would like to thank the one who wrote the code of the > GUI examples on the new SDK > (OpenOffice.org_2.3_SDK/examples/DevelopersGuide/GUI): it answers some > questions I had for a long time! Thanks hr (I don't know your real name!)!
Hehe. hr (Jens-Heiner Rechtien) is a release engineer, who integrated the child workspace where this was introduced. While he, as all our release engineers, surely deserves thanks for the work he does, in this particular case please direct your thank to Jürgen Schmidt (jsc, also to be seen in the CVS history). > But to my surprise, I used XComponentContext::getServiceManager() to get > the XMultiComponentFactory, then used its method > getAvailableServiceNames() and got a sequence that DOES contain these > service names: > > "com.sun.star.awt.MenuBar" > "com.sun.star.awt.PopupMenu" > "stardiv.vcl.MenuBar" > "stardiv.vcl.PopupMenu" > > And we can use any of the names: > > 1. "com.sun.star.awt.PopupMenu" > 2. "stardiv.vcl.PopupMenu" > 3. "stardiv.Toolkit.VCLXPopupMenu" > > as they instantiate the same type. > > And again to my surprise, "com.sun.star.awt.MenuBar" and > "com.sun.star.awt.PopupMenu" are not included on OOo2.3 SDK API > reference, nor in the source/offapi/com/sun/star/awt IDL files. > > So, are they going to be included in the API? Is it safe to use them? > What service name shall we use, out of the tree options? Since which OOo > version can they be used? The stardiv.* versions are in there for compatibility reasons only, and should definitely not be used. com.sun.star.awt.* is the name to use, in any case. I am not sure why they're not documented in the IDL reference, I suppose they easily could. You might want to submit an issue for this. > The problem here: FIRST the context menu of the edit control is > executed, THEN my pop up menu IF I right click on this context menu. > What I really need here is an XContextMenuInterceptor, but how do I get > the XContextMenuInterception for the edit control when it has no > com.sun.star.frame.Controller ? XContextMenuInterception is not implemented by UNO controls at all. I did not yet read about this interface in the developer's guide, but I suppose it can be implemented outside the frame/controller/model paradigm - but this simply isn't done ATM. Is the dialog whose screen shot you showed completely done in UNO? For the timing problem: Unfortunately, your mouse listeners, though called *first* (technically) are notified asynchronously. That is, the edit control gets the mouse click, starts the asynchronous notification of your mouse handler, and then opens its own context menu. When this is already open, the notification to your handler arrives. I fear there's no way how to work around this, there's simply no mechanism in the code AFAIK. You might get tired of this suggestion you hear too often from me :), but I in fact suggest submitting an RFE which requests the implementation of XContextMenuInterception for UNO controls. Ciao Frank -- - Frank Schönheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Base http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
