I am a newcomer to tcl/tk and need to run a script in cadence’s encounter. To do so I source my file in the provided interpreter and call my function. On the first run it works fine. However once I close my main window created with Tk, and try to rerun my method it tells me that it can’t invoke the wm command since the application has been destroyed. How can I rerun the script without restarting the tcl interpreter?
I am a newcomer to tcl/tk and need to run a script in cadence’s
Share
Closing the main window is the problem, it puts Tk into a non recoverable state that can only be followed by an exit.
Try binding to the WM_DELETE message and just hide/iconify the main window ‘.’ or use an extra toplevel window instead of the default ‘.’ window.
Depending on your script you might need to do a few more things, as some widgets/names might already exists when running twice.