Re: [Java-gnome-developer] OptionMenu events etc..
Brought to you by:
afcowie
From: Jonas B. <jb...@ni...> - 2003-10-05 10:14:10
|
On Thu, 2 Oct 2003 13:18:32 +0100, Mark Howard <mh...@de...> wrote: > Hi, > Before you do anything, please add a bug entry for this to > sourceforge.net - we seem to have lots of little unfinished bits like > this, but aren't tracking them very well. Also, add reports for anythin= g > else you find :) Ok did that, and will do in the future =3D) > Copying code like this should be fairly straight forward (for simple > widgets at least). We will of course review any patches to look out for > problems. Yes, it was pretty simple.. And I felt confident as soon as I figured out= =20 that event initialization hassle I posted a patch to just an hour ago.. =3D= ) >> I could then try to implement the stuff needed in OptionMenu (and mayb= e >> send a patch).. and maybe later other components as well. > I look forward to seeing it. > Note that many of the signals have not been implemented for a good > reason; we are trying not to copy the deprecated or internal parts of > gtk (option menu changing does not come into this category). Well, I noticed later there is this other option to register an event=20 listener for each of the items in the pull-down menu (like can be done in= =20 C as well), but I think it is a bit overkill for simple setups, and thus = I=20 think implementing the "changed" event is motivated. I named the event "CHANGE" in the java code, along the lines of (what I=20 thought was) the common practice. The patch is here: http://xkr47.outerspace.dyndns.org/patches/java-gnome/cvs-031005-1-Opt= ionMenuEvent.diff I tried to make the code in the patch look the same way as other widgets=20 were implemented in the cvs checkout I did last night. This patch does no= t=20 overlap with the patch I sent an hour ago regarding event registration=20 fixes. I continued following the same event registration model in this=20 patch. I tested it and it worked beautifully. Thanks for posting the extensive=20 advice on how to implement event handlers. - xkr47 |