Re: gtk_adjustment_new: GtkAdjustment* vs GtkObject*?
- From: Owen Taylor <otaylor gtk org>
- To: "K. Richard Pixley" <rich kyoto noir com>
- Cc: gtk-list redhat com
- Subject: Re: gtk_adjustment_new: GtkAdjustment* vs GtkObject*?
- Date: 25 May 1998 10:32:11 -0400
"K. Richard Pixley" <rich@kyoto.noir.com> writes:
> I'm confused. Why does gtk_adjustment_new return GtkObject* rather
> than GtkAdjustment*?
Probably in analogy to gtk_label_new() returning a GtkWidget * -
the idea being to return the base class instead of the derived
class.
I personally think that was a mistake, and tend to write:
GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_adjustment_new (...));
Because you want to use an adjustment as an adjustment far
more than as a GtkObject.
I'm not sure thought that the (minorly incompatible) change is worth
making at this point, however.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]