Re: [tcljava-user] tclblend java::bind with own event
Brought to you by:
mdejong
From: Klara W. <kl...@sp...> - 2001-12-17 10:11:16
|
I was just about to cut and paste all my classes into one file when i noticed that I had forgotten public in front of interface MyListener... *big sigh* Now it works. java::info said MyListener, but I guess that just looks for add/removeMyListener.. ----- Original Message ----- From: "Mo DeJong" <su...@ba...> To: <tcl...@li...> Sent: Friday, December 07, 2001 8:49 AM Subject: Re: [tcljava-user] tclblend java::bind with own event > On Fri, 7 Dec 2001 15:56:43 +0100 > "Klara Ward" <kl...@sp...> wrote: > > > Hi, > > I tried to use my own event with java::bind but it didn't work. > > Has anyone tried this? > > When I run(I'm on windows2000) the script on it's own it said "Error in > > startup script" and referred to the java::bind line. When I run in wish, it > > just won't work. I tell the java-class to invoke the event, but nothing > > happens, I think the event is performed, but tcl won't react to it. > > I tried the exact same thing with java.awt.ActionEvent and that worked. So > > either tclblend won't work with you own events, or I wrote my event wrong > > somehow... > > > > Klara Ward > > Hi Klara. > > I can't think of any reason why your own events would not work with the > java::bind command. Could you check to make sure that your class > is exposing events using the java::info command? Here is an example > of events exposed by a java.awt.Button from the java::bind man page: > > http://tcl.activestate.com/man/java1.2.6/TclJava/JavaBindCmd.html > > % java::info events $b > java.beans.PropertyChangeListener java.awt.event.ComponentListener > java.awt.event.MouseMotionListener java.awt.event.MouseListener > java.awt.event.HierarchyListener java.awt.event.KeyListener > java.awt.event.ActionListener java.awt.event.FocusListener > java.awt.event.HierarchyBoundsListener java.awt.event.InputMethodListener > > If you can see the listener but you can't bind events to it, then could you > trim your example down to one .java file and a few Tcl commands and > post it to the list? > > cheers > Mo DeJong > > _______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user > |