Setting up your script

Wrapping your code

To use TclTalkback to capture all the errors your script might generate, it's recommended that you use the following:

package require tcltalkback 
::tcltalkback::Setup ?options?
if {[catch {
#########################

The rest of your Tcl script goes here

#########################
} ]} { bgerror "Internal script error:" }

During application development, you should comment out the initial package require tcltalkback and ::tcltalkback::Setup ?options? lines so your script will use Tcl's default bgerror to display errors.

Tcltalkback requires Tk, Tile/Ttk and http (plus the registry package when used on Windows).