Hey folks,
After many hours of wandering around the JACL html files, I'm
beginning to conclude that JACL just wasn't designed to do what I'm
trying to do. Maybe I'm trying to do something too weird (this seems
to be a tendency I have with languages I encounter :-().
I'm trying to have my java program at one point pass a structure
of vectors about four levels deep into a TCL script, and have the
script iterate over the vector and do some sorting and sifting. It
should remove objects from the vector, and pass the resulting values
back out if necessary; perhaps it could just act on the the objects
referenced and there's no need to pass it values. The purpose of this
is to allow maximum tweaking of the sorting/sifting/transforming by
end-users.
None of the JACL docs seem to address how to pass java object
references into an interp script. I understand why; most of them were
written with the idea of using JACL to glue java objects otgether, or
using Java objects to extend TCL commands. Is what I'm trying to do
feasible?
I'm planning to load the TCL source into a java string variable
(or set of variables), and keep them around to reduce the overhead of
setting up new interp objects for each request. I'm thinking each
TCL script would be eval'd by the interp to set up a specific command
proc. If I understand this properly, the script file should be simply
a TCL proc definition that I submit to interp.eval().
I get as far as instantiating the interp object, but I'm drawing
a blank on how to pass the data in and get the results out. (not to
mention writing the actual TCL for the initial implementation, but
that should be straightfoward; most of it is stuff like "remove the
top of any branch that has a certain value in one of the
subbranches").
Can somebody send me a short step-by-step tutorial or suggestions?
Steven J. Owens
[EMAIL PROTECTED]
[EMAIL PROTECTED]
----------------------------------------------------------------
The TclJava mailing list is sponsored by WebNet Technologies.
To subscribe: send mail to [EMAIL PROTECTED]
with the word SUBSCRIBE as the subject.
To unsubscribe: send mail to [EMAIL PROTECTED]
with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'.
A list archive is at: http://www.findmail.com/listsaver/tcldallas/