Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I want an error for VFP Open dialog
Message
 
 
To
18/03/2004 09:45:23
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00885697
Message ID:
00887534
Views:
18
You're welcome, Fabio. <s>

For general (non-COM) use, I think what "everybody else" does is to enclose the relevant code in a open function wrapper, so that they don't have to write it every time.

Note that I am not telling you to have the same *opinions* as everybody, or anybody, else <s>. You are perfectly free not to agree that this is an appropriate solution and you are perfectly free to decide that it is "too much code" for you, although other people's opinions are different.

I am just saying that this is solvable and has been solved. When solved with a wrapper, the "open" line itself is only one line of code just as it is when it is *not* wrapped.

BUT WAIT. <s>

**This is not the only reason why this is the "right way" (in *my* opinion) for the product to behave and for you to handle your requirement.**

We have been creating this sort of "open" wrapper other reasons besides the one you state since Fox 1.x, right? For example there is the generated code in SPRs in 2.x:
IF NOT USED(..)
   ...
ELSE
  ...
ENDIF
SELECT ...
* something like this, 
* to be honest I don't recall
* exactly.
This code was *not* to avoid a dialog -- in fact if I recall you would *get* a LOCFILE() dialog if you weren't careful. This was somebody's idea of correct behavior. Not mine, and I suspect not yours. But somebody thought that was the right way to write the code.

The code there was not to everyone's taste, and the issues to be solved are not the same for everyone. The errors to be handled, as well as the preferred way to deal with them as they occur, are not the same for everyone.

How you want to compensate, whether you want to throw the error (which BTW would be considered extremely poor style in some circles <s>), what alternative search mechanisms or substitutions you want to use, should be up to you.

By writing the Open wrapper the way *you* want, you resolve the issues that you see, in exactly the style that reflects the way you prefer to path and open tables. If the product did this for you, it would not do it in a way that would meet everyone's needs.

HTH,

>L<
Previous
Reply
Map
View

Click here to load this message in the networking platform