Re: [Vala] GLib.Variant parmeter containing several types



Hello Michael
's' is string
'a{sv}' is for the hashtable of string+Variant
'as' is array of string

I tried to put a null for the string[] because I have to have the array
in the parameters but it should be nullable.
string: "some string"
HashTable:hashtable ,
string[]:null
So all parameters are there.
JM

On 24 September 2010 13:39, JM <interflug1 gmx net> wrote:
I tried
   HashTable<string,Variant> hashtable = new
HashTable<string,Variant>(str_has, str_equal);
   Variant v = new Variant("(sa{sv}as)", "some string", hashtable ,
null);

but no luck. This will compile, but crash at runtime.

That doesn't look like enough parameters?  I've not made such a
complicated variant yet, but there are at least two arrays there?
-mt





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]