Re: Removing _construct functions when fixing _new() functions.



murrayc t-online de (Murray Cumming) writes:

> On Mon, 2002-04-15 at 20:00, Owen Taylor wrote: 
> > murrayc t-online de (Murray Cumming) writes:
> > > Furthermore, it's very difficult to have the _construct() functions
> > > _and_ the properties. If you refuse this then I will probably have to
> > > remove the properties, meaning that libbonoboui will remain broken and
> > > might never be usable from glade-like stuff.
> > 
> > Well, one method of handling this is to improve the widgets so that the
> > construct properties are not construct-only, so you can make your 
> > construct function simply set the properties in question.
> 
> Yes, they are already not construct-only, so this might be possible. But
> here's another similar problem:
> 
> bonobo_window_construct() takes a BonoboUIContainer that was previously
> instantiated in bonobo_window_new(). Now it's instantiated in the
> *_instance_init() function, so what is bonobo_window_construct()
> supposed to do with a 2nd BonoboUIContainer?

Just set it and let the first be discarded. It's a bit inefficient, but it at
least keeps old code still working.

(I do wonder if an API bug should be filed saying that there is no way
of setting the ui engine without using the construct() function. But I have
no idea whether setting the UI engine is at all useful.)

Regards,
                                        Owen




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