Ariel Constenla-Haile wrote:
Hello people,

this message could have been named "Where is Base? (Part ...)":

http://wiki.services.openoffice.org/wiki/Framework/WorkInProgress/Addon_Menu_Toolbar_Merging

does not even mention OOo Base in the possible modules to use as context
for toolbar merging. But to be fair with Carsten Driesner (who is doing
a great job at the Framework project), this Wiki page was a little old.

So I added a link to the page I created yesterday:

http://wiki.services.openoffice.org/wiki/Office_modules_since_OpenOffice.org_2.3

Most modules do not need any explanation, because their names are pretty
obvious, but OOo Base modules may need some comments; so please feel
free to check if what I wrote is right, and make your corrections.


To check if things works (and what difference we find) I wrote an example:

http://www.arielconstenlahaile.com.ar/ooo/temp/MenuToolbarMerging.oxt

this example will *merge* menu items in every database related module
(it is possible to *replace* existing items, but I didn't find it good
for a demo extension).
To test if it work, I try to add different items to different modules.
The items are just for testing purposes, that means that:

* they have no functionality at all (other than displaying some tech.
info.),
* item names are only for testing purposes: no future features are
proposed or suggested  ;-)
* the place where the items are merged isn't meant to be the right one
(for example, extensions should have their entry on Help menu with other
extensions, but just to test it was possible, I merged the item right
after OOo's .uno:About dialog.


You can check the sources as a NetBeans IDE project at:

http://www.arielconstenlahaile.com.ar/ooo/temp/MenuToolbarMerging.SRC.zip

Feel free to make comments on that (please realize that I didn't clean
them up, so may be there is some crap ;-) ).


Some points are interesting:

* the XServiceInfo.getSupportedServiceNames() is now quite useless,
because if the doc. is a form or a wiz.-report, it will tell us that is
a css.text.TextDocument. Now we must use instead
XModuleManager.identify( XInterface aReference), this will give us the
module identifier.

* XModuleManager.identify() takes an XFrame/XModel/XController as arg.,
but we must be aware that some db modules have no model; so here is
safer to use the XFrame we get when the ProtocolHandler is initialized

* in the TableDesign and the RelationDesign modules, the first menu
entry I added gets dispatched twice when I choose it (this tested only
on Linux), you can try it: a MsgBox shows up, you click OK and another
MsgBox shows up; is this a bug or a stupid thing I've done?


* something I wonder: can we access form the dispatch framework (i.e. an
extensions that works from the user interaction pressing a toolbar/menu
item) the data in the module? I mean, for example, if a query/view/table
is open by the user, can we get some info. about the query/view/table
name, about it's state, etc? if we work with UI interaction via Dispatch
Framework, we must work from the XFrame; can we access from there info.
about what's happening in the modules TableDesign, RelationDesign,
QueryDesign, DatasourceBrowser? With the DatabaseDocument and the other
modules it's easy to get a refence to the DataSource, the table the form
is based on, etc., but with these other modules?

I will add some more things to the demo, and may be it will be a good
idea to write something in the wiki in order to attract database related
extensions developers, what do you think?
Any idea is welcome.

Bye and have fun with the demo,
Ariel.


Hey Ariel,

This is great - really great.

Regarding the double call in the table editor and relation dialog. Didn't happen to me under XP.

Do have an interesting ( well maybe ) puzzle for you.

Grabbed your example project and used NetBeans 5.5.1 under XP to build the oxt, jar files. The project built without a problem and the extension worked in all three versions of ( 2.3, m236, SO8 u8 ) under XP without a problem. Then I added the extension to the Kubuntu 7.1 AMD64 Distro version of OO.o 2.3 ( 64 bit, with 64 bit SUN JRE ) again it worked without a problem. Like I said this is great.

Here is the puzzle - and it isn't your code because I haven't been able to get any addon to work properly doing this. I rebuilt the .jar and .oxt files using NetBeans 5.5.1 under Kubuntu 7.1 and guess what. It loads into the 2.3 64 bit OO.o but the merged menus do NOT appear - and here is the odd part. Go back to XP and use the same extension ( built under Kubuntu ) that did not work under kubuntu - add it to all the OO.o versions under XP ( 32 bit ) and it works just like the one I first built under XP...Like I said, it is a puzzsle ( at least to me )

Anyway - I am hoping that you are kidding about your menu choices not being an indication as to what you are planning on working on first...

A)  as in an export / import addon
B) as in it will only be your first Base addon...

Drew :-)



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to