Board index » cppbuilder » TSaveDialog crashes when file of same name is currently open

TSaveDialog crashes when file of same name is currently open

I use TSaveDialog to get the file name to save a CSV file.  When the
file exists the user prompted to overwrite the file but if the file is
currently open an exception is raised.

What is the best way to handle this?  Catch the exception? Or is there a
combination of options that will do the trick?

Thanks

--
Robert N. Lockwood
USDA Forest Service
Forest Fire Laboratory
Riverside, CA
RNLockw...@attglobal.net

 

Re:TSaveDialog crashes when file of same name is currently open


Hi Robert --
[snip]

Quote
> What is the best way to handle this?  Catch the exception?
> Or is there a combination of options that will do the trick?

I'd catch the exception.  While there may be a combination of Options settings
(which I am unaware of), the bahavior of the common dialogs is less than
consistent amongst the different versions of Windows.  Handling the exception,
IMHO, is the most robust route.

Good luck.
--
Damon Chandler (TeamB)
http://bcbcaq.freeservers.com

Other Threads