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).

Reply via email to