Re: construct functions



On Tue, 2001-10-23 at 17:02, Sven Neumann wrote:
> 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.

Thanks a lot. This is very helpful. I see a possibility to auto-generate
some code. 

-- 
Murray Cumming
murrayc usa net
www.murrayc.com




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