[Gambas-user] DBusVariant or DBusValues?

Benoît Minisini g4mba5 at gmail.com
Fri Feb 23 15:00:15 CET 2018


Le 23/02/2018 à 14:56, Hans Lehmann a écrit :
> 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
> 

Mmm. I think so... If it's for a book, you can provide an example to 
explain that if you want to return several values, you have to use 
DBusValues because DBusVariant is ambiguous.

-- 
Benoît Minisini


More information about the User mailing list