General information
Category:
Coding, syntax & commands
>>>The Locfile() command returns a VFP error if you click CANCEL, instead of a null string or other "This didn't work" value. I *can* use Getfile(), although I would prefer Locfile() for a specific use. Any suggestions other than disabling our standard error handler before the call, trapping for this error and then re-enabling the error handler?
I am not sure this would work since I don't know how your error handleing works, but I assume you are using on error global error handler.
Well, in VFP each object has a method, when an object creates an error VFP goes up the container hierarchy and if it finds no code in any error methods it will use the on error setting.
So, perhaps on the form, or in the object you use LocFile() you could handle that specific error. If the error is not the one that mean LocFile Canceled() you can call your error handler explicitly.
(In 6.0 you could cause the error again with the ERROR keyword)
BOb
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only