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



On Mon, Apr 25, 2011 at 02:43:14PM +0800, Nor Jaidi Tuah wrote:
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*/ ?

SomeClassName.get_type().name();

-- 
http://www.debian.org - The Universal Operating System

Attachment: signature.asc
Description: Digital signature



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