[Gambas-user] D-Bus method with a complex data type triggers an error

Benoît Minisini g4mba5 at gmail.com
Tue Mar 13 16:58:39 CET 2018


Le 13/03/2018 à 16:34, Hans Lehmann a écrit :
> Hello,
> 
> I am testing a D-Bus server that offers a method with a complex data 
> type as a return value ( signature isiava{sv} ).
> 
> The method uses a parameter of type String. A D-Bus client calls the 
> method and should map the return value to a (gambas) data type Struct.
> 
> Unfortunately there is an error: org.freedesktop.DBus.Error.Failed: Zero 
> object?
> 
> The two projects for server and client are attached. I can't find the 
> error on my own, so I need help.
> 
> With kind regards
> 
> Hans
> 

Struct are not used by gb.dbus. Struct is mainly there when dealing with 
external functions in libraries written in C/C++. You should not use 
them for anything else, unless as a synonymous of a class with no 
methods and public members only.

Compound values are returned as an array of variants.

See http://gambaswiki.org/wiki/doc/dbus#t10

Regards,

-- 
Benoît Minisini


More information about the User mailing list