[Gambas-user] DBusVariant or DBusValues?

Hans Lehmann hans at gambas-buch.de
Fri Feb 23 14:56:51 CET 2018


Am 22.02.2018 um 22:44 schrieb Benoît Minisini:
> The reason is that if they were the same, i.e. if we had only 
> DBusVariant, it would not be possible to make the difference between a 
> DBus method that returns of array of three variants with a method that 
> returns three values, each one being a variant.
>
> With DBusValues, we are sure that we want to return several values, 
> and that if it the value of the DBusValues is an array, then we have 
> multiple values.
>
> The DBus signature associated with these things are different: "av" 
> for the DBusVariant, "vvv" for the DBusValues. 
Hello!

Would this description also be correct?

The reason for the existence of two classes is that only such a 
distinction can be made between two methods, one of which returns an 
array of three Variant type values and the other three values, each of 
which is Variant. In both cases there are exactly three values! Using 
DBusValues makes it clear that you want to return several values. This 
is also reflected in the different DBus signatures: for DBusVariant it 
is "av" and for DBusValues it is "vvv".
?

Regards

Honsek


More information about the User mailing list