Re: [tcljava-user] Looking for Example
Brought to you by:
mdejong
From: Mo D. <md...@cy...> - 2001-05-07 07:25:28
|
On Fri, 4 May 2001, Dan Schenck wrote: > I'm looking for an example of establishing a callback to a Tcl proc from Java. What I have in mind > is parsing an XML file with the Xerces SAX parser and having the callbacks go to Tcl procs. This > may be too convoluted to do but essentially here is roughly the sequence of events: > > Tcl calls Xerces (Java) --> > Xerces parses XML and calls back to Tcl for each XML node --> > Tcl procs > > I would have to create an interp that my Java callbacks for Xerces could use to call a Tcl proc. Is > it that simple? Sure. You just need to create a TclEvent() in Java and add it to the Tcl event queue. Take a peek at the processCommand() method in the pyramidpkg demo: demos/pyramidpkg/AppletConsole.java You could also take a look at these old posts to the mailing list on the subject: http://www.mail-archive.com/tc...@sc.../msg00647.html http://www.mail-archive.com/tc...@sc.../msg00159.html If someone is looking for a way to help out, you could take these examples and create the most trimmed down callback demo possible. Of course, some online docs would help too. cheers Mo DeJong Red Hat Inc |