Re: invalid unclassed pointer?

    Havoc> This is totally broken though, because GdkEvent*event would just be
    Havoc> NULL most of the time, and there are many places in GTK where other
    Havoc> parameters are basically required.
The event would be NULL most of the time because of the GTK design, not
because it is intrinsically broken.  If one were to implement a generic
callback system for GTK, the event could easily be left out.

I find the restriction of one user data parameter in Xt callbacks to be quite
effective.  It forces me to collect related data into data structures that can
be passed to callback routines.

The only undesirable side-effect I've seen is that lazy coders tend to fall
back on global variables.

    Havoc> There aren't that many variants for commonly-used signals, and you
    Havoc> can always look it up.

The point is that with Xt, I don't have to look it up.

    Havoc> The advantages of the GTK way are numerous; one of the more
    Havoc> important is that signals are also introspectable virtual
    Havoc> functions.

Which is useful for...?
Mark Leisher
Computing Research Lab            Once you fully apprehend the vacuity of a
New Mexico State University       life without struggle, you are equipped
Box 30001, Dept. 3CRL             with the basic means of salvation.
Las Cruces, NM  88003                            -- Tennessee Williams

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