Is there a means to figure out what kinds of variables a Gee.List stores?

The following doesn't work because if I call mystery_list.get(0), I get
the compiler error: has no member named ‘g_destroy_func’.

using Gee;

public bool perform (Gee.List mystery_list) {
    if (! mystery_list.is_empty) {
        Value val = mystery_list.get (0);
        if (val.type().is_value_type) {
            // something something
        }
    }
}

If I cast mystery_list to Gee.List <Object>, my problem is solved (because
now a destructor is available), but then that means that mystery list
can only contain items descended from GObject.



      
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to