Hi Drew,

nice to hear from you!
Some days ago a user was asking where were you, because he didn't find you, so I started to feel worried if something bad happened! (as in the last days you were not so active as you use to be on these list)

Andrew Jensen escribió:
Ariel Constenla-Haile wrote:
Hello people,

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

this "joke" was directly addressed to you ;-)

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.

I will have to give it a try and see if it is some SuSe issue (I will also have to try on SuSe with other OOo versions)

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

this last one sounds as the cause...

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 )

My guessing: distros versions SUCKS!

An example: the so famous SuSe version (of 2.3.0) didn't show the dialogs in my OOo files, yes the Basic libraries, but NOT the dialogs. Another example: a search & replace with reg.expressions \n \n to replace line brakes with para. brakes crashes always OOo-SuSe-version.

The joke here: they don't even show a crash report (nor send it to *their* developers).

So I think this a DISTRO-version issue. Remember that this feature of merging in menu & toolbars is new in OOo 2.3.0 (ups I didn't specify any dependency ). So "sure" the distro made their build on old sources.


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

as soon as Frank give us the gift of the UNO service for the copy Table dialog, I will write a demo extension testing it ;-)

B) as in it will only be your first Base addon...

no, it isn't my first Base extension. I have a few but as I've been payed for them and were for private customers purposes, I can't make them GPL.

But, for example, exporting to Calc is very simple and useful, with a pair of Java classes this can be done. And so other things (for example I always wanted to get all the database metadata displayed, this is simple too).

What I miss here is a context menu interceptor: you can add a new menu item to right-click and export the selected table/view/query. But as I made a RFE for that, one day will have this :-)

Regards
Ariel.


--
Ariel Constenla-Haile
La Plata, Argentina

[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://www.arielconstenlahaile.com.ar/ooo/



"Aus der Kriegsschule des Lebens
                - Was mich nicht umbringt,
        macht mich härter."
                Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.

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

Reply via email to