class classname
{
public method shutdown
constructor { args } {}
}
body classname::constructor { args } {
# Prevent killing of main window
wm protocol [winfo toplevel $itk_component(hull)] WM_DELETE_WINDOW [code $this shutdown]
}
proc classname::shutdown
{
if {![closeSession]} {
# If the user didn't cancel, exit
exit
}
}