int[] as an argument of a Remote Method

hannehomuth hannehomuth1 at gmx.de
Wed Jul 16 01:05:02 PDT 2008


Hi Everyone,

If tried a while to set an int[] as an argument of one of my remote methods.
But that doesn't work, I have tried it with a single int and that worked,
but not with an array? Is they anything I've to set or configure before, or
is it possible in general to send arrays overs the dbus. Here some code.

This is a method in my RemoteObject

public class Services implements DBusInterface {
....
....

public void setLedArray(int[] whichLeds, int status)
    {
        System.out.println("Call setMoreLeds");
        int elementCount = whichLeds.length;
        setMoreLeds(whichLeds, status);
        System.out.println("Call ready");
    }

private native void setMoreLeds(int[] whichLeds, int status);
....
....
....
}

And here the call in the Client

int[] allLeds;
...
...
...
remoteObj.setLedArray(allLeds, status);
...
...
...

The Array is initialized and has values, was tested.

Thx for suggestions

-- 
View this message in context: http://www.nabble.com/int---as-an-argument-of-a-Remote-Method-tp18482014p18482014.html
Sent from the Free Desktop - dbus mailing list archive at Nabble.com.



More information about the dbus mailing list