Re: Exporting the Gtk+ object system to interpreters



On Sun, 13 Dec 1998, Tim Janik wrote:

> please read the C comments below more carefully. default handlers need to be
> setup in class_init() functions and from then on are considered static data.
> we shouldn't break that convention, not even for interpreter bindings, i
> couldn't even come up with a reason why you'd want to subsequently
> change default handlers. thus, the data argument does not need a destroy
> notifier.

>From my viewpoint, this is a matter of semantics and/or convenience: in a
more dynamic language, we may not be following the exact path that the
creation of a C/Gtk widget follows, complete with knowing the exact set of
default handlers during the creation phase.

The destroy handler is merely a matter of long-term convenience: without
an individual destroy handler, bindings will leak and need to be slightly
redesigned when either default handlers _can_ be changed, or classes can
be destroyed. You might as well put the destroy handler in now, and be
done with it. 

Neither of these are crucial, they are just generalizations. (Which
usually lead to _less_ code and overhead in the binding, it seems).


-- 
Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)




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