Re: construct functions



Hi,

Jonathan Blandford <jrb redhat com>  writes:

> It's just a convenience function from C.  You can also do
> 
>  g_type_new (GTK_TREE_VIEW_TYPE, "model", model, NULL);

I think you meant to write 

  g_object_new (GTK_TREE_VIEW_TYPE, "model", model, NULL);


For objects that take a mandatory argument with the _new() function
like for example GtkTextTag, you _need_ to specify the corresponding
property when you call g_object_new(). This is indicated by the 
G_PARAM_CONSTRUCT_ONLY flag.


Salut, Sven



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