Re: [Vala] Inserting GTypes into a Clutter.ListModel



On Tue, Sep 13, 2011 at 2:15 PM, tomw <tomw ubilix com> wrote:
Hi,

trying to set up a Clutter.ListModel like according to [1]:

var model = new Clutter.ListModel (3, G_TYPE_STRING, "string_a",
G_TYPE_STRING, "string_b",
                                     G_TYPE_INT,    "id");

failed as the GTypes are not recognized. Any idea how to do that?

You need to use the typeof operator -

var model = new Clutter.ListModel (3, typeof (string), "string_a",
                                                            typeof
(string), "string_b",
                                                            typeof
(int),    "id");

Sam



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