Hi Andreas,

Andreas Lauschke escribió:
> Ariel,
> I thought I send this to you because you have been the most helpful, but
> if I start bothering you, let me know. I cannot abuse your time.

oh no you don't bother at all! I still owe you an answer to the other
mail, I had to wait until now that I have a little free time.

Anyway, if you send your mail to [email protected] you get more
chances to a faster/better answer, and there you'll find more qualified
people, in fact you'll find there the plug-in developers.

So I CC you and send this mail to the [email protected] mailing
list (notice that also [EMAIL PROTECTED] would be a proper list)

In this case, a mail to this list would be better, as this is IMHO an
issue in the plug-in: it does not re-build the types library when the
idl files are modified; when you choose "Debug...", "Create OXT" etc. ,
the plug-in should IMO check if the IDL files were modified and re-build
the types library in that case.

Steps to reproduce it:

* create an add-in using the wizard
* debug it by choosing "Debug Extension in Target OOo"
* stop debugging
* add a new function to the interface IDL definition
* add the new function to the Add-in configuration CalcAddIns.xcu
* add the implementation for this new function on your class
* debug it by choosing again "Debug Extension in Target OOo"

You will get an error when registering the extension
http://www.ArielConstenlaHaile.com.ar/ooo/temp/images/Andreas.png

The solution is *cleaning* the project (right-click and choose "Clean")
before deploying it, this way the type library will be re-build again.

> So I could get it to compile with a second function I have inserted, I
> could generate the oxt, but then I cannot deploy. The extension manager
> in OOo complains with a "number of types" error with respect to the
> X<myname>.idl file, see the screenshot attached.
>  
> What I did was adding
>  
> public int testintegeroutput()
>     {
>         return((int) 555);
>     }
>  
> in my java file and
>  
> module com { module calclink {
>     interface XConnectToMathematica {
>         /// used to set an add-in locale for formatting reasons for example
>         [optional] interface ::com::sun::star::lang::XLocalizable;
>  
>         long connect();
>         long testintegeroutput();
>        
>     };
> }; };
>  
> in my X...idl file (connect was already there and it worked) and
>  
> <node oor:name="testintegeroutput" oor:op="replace">
>                     <prop oor:name="DisplayName">
>                         <value xml:lang="en">testintegeroutput</value>
>                     </prop>
>                     <prop oor:name="Description">
>                         <value/>
>                     </prop>
>                     <prop oor:name="Category">
>                         <value>Add-In</value>
>                     </prop>
>                     <prop oor:name="CompatibilityName">
>                         <value/>
>                     </prop>
>                     <node oor:name="Parameters">
> $!xcuParameters!
>                     </node>

although this wasn't the problem here, take care of NetBeans XML formating

<value>
        Something
</value>

depending on the context it may not work or give a not desired result
(for example in functions names), so better is

<value>Something</value>

On the other hand I've no idea what this $!xcuParameters! is. [1]
When your function has no parameters, you just write an empty node
<node oor:name="Parameters"/>

Anyway the Extension Manager didn't complain about it...


> in my .xcu file (this is just copied from the one for connect, but with
> a name change).
>  
> I also noticed that I have to use int in the code but long in the .idl?
> Also double and String didn't work. I don't grok this.

this is because in the IDL for your interfaces you must use UNO types,
and in your code you must use the corresponding Java type mapping the
UNO type, as described in
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/FirstSteps/Common_Types
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Simple_Types
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Java/Type_Mappings


Regards
Ariel.




[1] a quick search in http://lxr.go-oo.org shows that it comes from
org.openoffice.extensions.util.AdvancedReplace.doSimpleReplace in
api/oonetbeansintegration/ooextensions/src/org/openoffice/extensions/util/AdvancedReplace.java
1.13 331-345

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