Re: any policy for foo_new() return types?

    Stefan> I believe that it's common policy to return a GtkWidget* if this
    Stefan> is available in the ancestry, and otherwise fall back to a
    Stefan> GtkObject -- but why this policy, anyway? And why do some of the
    Stefan> above examples draw away from this policy?

I really like GTK (but don't use GNOME).  After many years of using the
Intrinsics, I got used to object creation calls all returning Widget*, and all
widget-related functions taking Widget* arguments, leaving the functions to
check for valid subclasses instead of the programmer doing it explicitly.

Though I find some of these differences mildly annoying, these are minor
because GTK is very usable in just about all other respects.

My guess is that the differing return types were done as a matter of
convenience at one point and never quite got fixed to meet policy.
Mark Leisher
Computing Research Lab            Cinema, radio, television, magazines are a
New Mexico State University       school of inattention: people look without
Box 30001, Dept. 3CRL             seeing, listen without hearing.
Las Cruces, NM  88003                            -- Robert Bresson

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