Hi Rony,

Rony G. Flatscher escribió:
> Hi Ariel,
> 
> just a question looking at your Java code example:
> 
> ... cut ...
> 
>>                 xScriptURIHelper = ScriptURIHelper.create( xContext,
>> sLanguage, sLoc );
> ... cut ...
>
> Where did you find the documentation about this variant of instantiating
> a new style services?

mmm ... is it documented somewhere? ... yes in Professional UNO:
Java language binding
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Java/Mapping_of_Services
C++ language binding
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C%2B%2B/Mapping_of_Services

"The semantics of both explicit and implicit service constructors in C++
are as follows. They are the same as for Java:
    * The first argument to a service constructor is always a
com.sun.star.uno.XComponentContext, which must be a non-null reference.
[...]"


but to be honest I didn't learn it from the Dev's Guide, but thanks to
the code completion in NetBeans/MS Visual Studio/et.al.

> (Was only aware of the creation with the help of a service manager.
> Also, looking up the IDL definition would show the method create() as a
> constructor, but the signature lacks the first argument xContext
> altogether!)

The first argument is a css.uno.XComponentContext reference not in the
UNO IDL of new style service constructors, but in the language bindings,
at least in C++ and Java that support up to now these constructors; so
it's a question of mapping the UNO IDL to the target language.

Regards
Ariel.




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

Reply via email to