Re: [java-gnome-hackers] Event Handling proposal
Brought to you by:
afcowie
From: Mark H. <mh...@ti...> - 2002-09-03 20:27:05
|
On Tue, 2002-09-03 at 20:43, Philip A. Chapman wrote: > I agree that GtkEvent should not allow arbitrary integers. My > suggestion would be to use org.gnu.glib.Enum. That way it does not > allow arbitrary values and it's use is consistant with the way things > are done elsewhere in GTK. Honestly, in my mind, I *thought* GtkEvent > extended Enum; but I see now that it doesn't. Event can't extend enum - it is created at the time the gtk signal is made, including references to the source widget and possibly other data (depending on the event).=20 The EventType class I used in the example contains both an integer value and a String for each type. The integer is the ID and the string is used in the GtkEvent.toString method (useful for debugging applications). Hence, EventType classes would be best extending the EventType class I defined in that example.=20 --=20 +----------------------------------------------+ | Mark Howard cam.ac.uk mh344@ | | http://www.tildemh.com tildemh.com mh@ | +----------------------------------------------+ |