> > Hi,
> > We are planning to use SWIG to call C methods from Tcl/Tk script.
> > What is the best way to invoke callbacks from C methods to Tcl/Tk
> > Does SWIG support callbacks?
> SWIG will write the main program code for you. You can put code
> into the %init block to save the interpreter pointer (interp).
> From your C code, you can then call Tcl_Eval(interp,"command");
Hi, The SWIG extension will be dynamically loaded from tclsh. How do I get
the tcl interpreter in the %init bloack? As I understand, Tcl_CreateInterp
returns a new interpreter. But, we want callback to access variables from
tclsh. Is there any tcl call to get existing tclsh interpreter?
I am tcl novice, therefore this question may be trivial..
Thanks a lot for the help,
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own