Hi Drew,
Drew Jensen escribió:
Drew Jensen wrote:
IIRC you said you where thinking about moving the whole extension to
Java, sure you know the advantages of this, with the NetBeans IDE
plug-in everything is easier:
*smile*...easy for you to say..
Before getting into this - let's say I decide..OK, I've decided..to go
forward as an extension written in Java using the NetBeans
OpenOffice.org plugin.
One simple question.
It appears to me that if I use the dialog designer in OpenOffice.org
to create the UI and then assign the events from the dialog controls
to methods in the UNoComponent that I will create in Netbeands - then
this extension will require OO.o 2.4 or greater.
Is that true?
although both css.awt.X|DialogProvider and css.awt.X|DialogProvider2 are
unpublished [1]
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/DialogProvider.html
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XDialogProvider.html
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/DialogProvider2.html
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XDialogProvider2.html
IIRC I used them since OOo 2.2 or 2.3,. Unfortunately there are no
@since tags, so to know when they were included you have to browse the
CVS history (too lazy to do that) or read
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Accessing_Dialogs
Notice that on the Dev's Guide says:
"Before OpenOffice.org 2.0.4 dialogs designed with this Dialog Editor
could only be reasonably used in the context of OpenOffice.org Basic
respectively in the scope of the Scripting Framework [...] From
OpenOffice.org 2.0.4 also component methods can be bound to control events."
but I'm not completely sure if the version is right (for my it sounds
like the mentioned version is too young, but sure I'm wrong)
Sorry that was meant to be a two part question.
That if I want to support versions of OO.o further back then 2.4 then
what I would do is
Create the dialog in OO.o.
Create a very simple skeleton of a library in OOobacic.
The events for the controls on the dialog would call functions in this
OOobasic library.
The functions in the Basic library are simply a map to call the methods
in the UNOComponent that I create in NetBeands.
Do I have that basically right?
IMO you have three options:
* create a dialog in the Dialog Editor, use XDialogProvider, add
listeners to its controls to implement functionality
* create a dialog in the Dialog Editor, use XDialogProvider2, so that
when you design the dialog you can bind events to your component
* use the oldie but goody fashion and create the dialog at runtime: this
will [hopefully] work on *every* OOo version
Me, I've chosen this last road: as I create my dialogs using the
official measurements [2] to keep the OOo look and feel, absolute
positioning in the Dialog Editor is hard to maintain [they are working
on a layout mechanism, but this will be for 3.x, so not backwards
compatible]
Regards
Ariel.
[1] A good question to post to the API mailing list is: if they both are
unpublished, what the hell didn't they merge then, instead of using this
horrible Xxxx2 way?
[2] From the following sources:
* /svtools/inc/controldims.hrc
* Christian Jansen, Dialog Specification and Guidelines - Visual Design.
http://ui.openoffice.org/knowledge/DialogSpecificationandGuidelines.odt
* Berend Cornelius, Concept for Wizards.
http://specs.openoffice.org/installation/wizards/wizards_NewConcept.sxw
--
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]