Re: Removing _construct functions when fixing _new() functions.
- From: Owen Taylor <otaylor redhat com>
- To: murrayc usa net
- Cc: GNOME2 Release Team <gnome2-release-team gnome org>, gnome-components-list <gnome-components-list gnome org>
- Subject: Re: Removing _construct functions when fixing _new() functions.
- Date: Mon, 15 Apr 2002 14:00:36 -0400 (EDT)
murrayc t-online de (Murray Cumming) writes:
> On Mon, 2002-04-15 at 16:08, Murray Cumming wrote:
> > I have 3 patches here
> > http://bugzilla.gnome.org/show_bug.cgi?id=77225
> > to make libbonoboui's various widgets' *_new() functions into mere
> > convenience wrappers for g_object_new(). This is achieved by adding
> > properties. That's what's they're supposed to be, for the sake of
> > language bindings and glade.
> >
> > While doing this I've removed the old *_construct() functions. They were
> > the GTK1.2 way to solve this problem.
> >
> > Officially, this breaks API, but only language bindings (not many for
> > libbonoboui yet) and glade (doesn't seem to affect it yet) are going to
> > notice, and they should stop using *_construct() anyway. It doesn't make
> > much difference, but when *_construct() are removed it makes it easier
> > to see that libbonoboui does things properly.
>
> 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.
(I think actually that a lot of construct() functions outside of GTK+
were added, incorrectly, on the theory "the new() function takes arguments
so we must have a construct() function".)
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]