Hello people,

Juergen Schmidt escribió:
Ariel Constenla-Haile wrote:
Hi Frank/Jürgen

Frank Schönheit - Sun Microsystems Germany escribió:
Which brings me to: Ariel, what do you mean with "initialize fails"? How
does this manifest?

In old-style services (like FilePicker), you instantiate the service in Basic by calling createUNOService("com.sun.star.ui.dialogs.OfficeFilePicker") and then you call initialize(Array(com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION))

With a new-style service constructor, you can NOT call createUnoService() and then initialize() passing to this last call the constructor's parameters. In the example [1] initialize() "fails" == the object returned by createUnoService() has no such method, i.e. has already been initialized using the default constructor (I think :-( )
mmh, i don't know, have to check it in detail



And a new question: what diference makes (in Basic) if we use createInstanceWithArgumentsAndContext or just createInstanceWithArguments? In the example, both work the same.
yes, it still works but as mentioned before it's better to use the new methods because it's the newer and recommended way. If we would have enough time to change all places we would do that and we should deprecate the old interface.


ok, finally it's clear for me :-)

But my conclusion is: lucky my I use Java, with the NetBeans IDE code completion and your excellent plug-in my life is very easy; but for the OOo Basic programmer, the whole thing is rather confusing (not to mention the "common" user who is only used to call createUnoService() ).

Bye and thanks,
Ariel.


[1] http://www.arielconstenlahaile.com.ar/ooo/temp/NEW_STYLE_SERVICE_CONSTRUCTOR_IN_BASIC.odt



--
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