[Vala] how to register new glib type without creating an instance?



When I tried this:
/*1*/  Object.new (Type.from_name ("SomeClassName"))

I got this runtime error:
**: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed

unless, somewhere before that, I have this:
/*2*/  new SomeClassName ()

Is there any way to get /*1*/ to work without preceded by /*2*/ ?

hand
Nor Jaidi Tuah





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