Hi:
Here's what my setup is:
I have a C++ exe on Windows that has the TCL interpretor stuff linked in. My TCL script is read, and processed by this exe. Now, here's what I want to do:
This exe is generating certain events. For some of these events I want a proc in one of my TCL scripts to be invoked. Also, I want to be able to register and deregister my TCL event handler by running TCL through the exe. For example:
handler.tcl contains "proc eventHandler{}"
"proc register{}" and "proc deregister{}".
When I run handler, and first call "proc register", I want all subsquent events of interest to invoke "proc eventHandler". Later, when "eventHandler" so desires, it can call deregister to stop the callback.
My question is: What do I need to do to do this? I am guessing that I will need to add events from my C++ piece onto the TCL event queue; but how do I setup my TCL "proc eventHandler" as the event handler?
Thanks a tonne!
Here's what my setup is:
I have a C++ exe on Windows that has the TCL interpretor stuff linked in. My TCL script is read, and processed by this exe. Now, here's what I want to do:
This exe is generating certain events. For some of these events I want a proc in one of my TCL scripts to be invoked. Also, I want to be able to register and deregister my TCL event handler by running TCL through the exe. For example:
handler.tcl contains "proc eventHandler{}"
"proc register{}" and "proc deregister{}".
When I run handler, and first call "proc register", I want all subsquent events of interest to invoke "proc eventHandler". Later, when "eventHandler" so desires, it can call deregister to stop the callback.
My question is: What do I need to do to do this? I am guessing that I will need to add events from my C++ piece onto the TCL event queue; but how do I setup my TCL "proc eventHandler" as the event handler?
Thanks a tonne!