Hi,

just say :

wm protocol .xx WM_DELETE_WINDOW {closeDB; exit}

where xx is your window-name

Regards


"[EMAIL PROTECTED]" wrote:
> 
> Greetings,
> 
> I have had no feedback on the topic from the list so I will offer to the group
> what I have decided to do:
> 
> on start in just open the file from main with this proc:
> 
> proc {openDB} {} {
> ####################
> #  openDB -- open the db when program starts
> #
> #  collects -- no vars
> #
> #  returns -- Error Msg if there is a problem!
> ####################
> 
> if { [catch  {mk::file open db tracker.dat}]} {
>         dlgInfo "Data Base Was Not Opened!  ERROR AT START!!"
>     } else {
>     dlgInfo "Data Base opened normal:)"
>     }
> }
> 
> I close the app I close the data file with this proc on exit:
> 
> proc {closeDB} {} {
> ####################
> #  closeDB -- open the db when program stops
> #
> #  collects -- no vars
> #
> #  returns -- Error Msg if there is a problem!
> ####################
> 
> if { [catch  {mk::file close db }]} {
>         dlgInfo "Data Base Was Not Closed!  ERROR AT START!!"
>     } else {
>     dlgInfo "Data Base Closed normal:)"
>     }
> }
> 
> Which now leads me to the question about how to ensure the database gets closed
> correctly?  i.e.  What if they do not use my exit button, what will happen?
> 
> Thoughts welcome:)
> 
> --
> RJ Ent. -- http://www.rjent.pair.com
> Had Enough GPF's from M$?
> Try something stable:  http://www.freebsd.org or http://www.redhat.com
> Strong Supporter of Visual Tcl -- http://www.neuron.com/stewart/vtcl/
> 
> ---------------------------------------------------------------------------
> To unsubscribe from the Visual Tcl mailing list, please send a message
> to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
> message body (where [EMAIL PROTECTED] is your e-mail address).

-- 
-----------------------------------------------------------
Ing. Hans-Michael Haschek, Case Software Technologies
Tel. ++43 (0) 61 32 / 28 0 33 -34
Fax  ++43 (0) 61 32 / 28 0 33 -4
www : http://www.t-ide.com
Lets have Tcl/Tk at your fingertips with TIDE
---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).

Reply via email to