Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have a java macro and a parcel-descriptor.xml with just one method declared:

<?xml version="1.0" encoding="UTF-8"?>
<parcel language="Java" xmlns:parcel="scripting.dtd">
    <script language="Java">
        <locale lang="en">
            <displayname value="CO.Java"/>
            <description>
                CO macro.
            </description>
        </locale>
        <functionname value="CO.CO_submit"/>
        <logicalname value="CO.CO_submit"/>
        <languagedepprops>
            <prop name="classpath" value="COLO.jar"/>
        </languagedepprops>
    </script>
</parcel>

Suppose I have another class method (CO_test) I'd like to call from LO. I'd like to add CO.CO_test 
just like I declared CO.CO_submit.
How can I do this?

If I try the following:

<?xml version="1.0" encoding="UTF-8"?>
<parcel language="Java" xmlns:parcel="scripting.dtd">
    <script language="Java">
        <locale lang="en">
            <displayname value="CO.Java"/>
            <description>
                CO macro.
            </description>
        </locale>
        <functionname value="CO.CO_submit"/>
        <logicalname value="CO.CO_submit"/>
        <languagedepprops>
            <prop name="classpath" value="COLO.jar"/>
        </languagedepprops>
    </script>
    <script language="Java">
        <locale lang="en">
            <displayname value="COtest.Java"/>
            <description>
                CO test macro.
            </description>
        </locale>
        <functionname value="CO.CO_test"/>
        <logicalname value="CO.CO_test"/>
        <languagedepprops>
            <prop name="classpath" value="COLO.jar"/>
        </languagedepprops>
    </script>
</parcel>

then I can see both methods in LO. So I can select any of the two and run them. However, no matter 
which one of the two I try to run, only the CO.CO_submit method will be run.

What am I doing wrong?

I haven't found a single example on the internet or in the docs where a parcel-descriptor defines 
more than one method to call.

Surely I could duplicate the jar and parcel-descriptor files and define one method in each of them 
but that seems too inefficient.

Thanks,

Vieri


-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.