Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Portability layer
Message
From
03/09/1998 18:40:20
 
 
To
03/09/1998 15:55:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00132981
Message ID:
00133041
Views:
14
Hi Robert

In a minor respect this is available but not the way you'd probably want it.
For commands, you can do the following:

For commands, theres DoCmd === _VFP.DoCmd(cCommand)
For functions, theres Eval === _VFP.Eval(cFunction)

Does this help?

Failing that, you build your own wrapper class with custom methods with roughly the same names, for example x=oIntlWrapper.myLeft("hello",5).

>Anybody ever implemented a portability wrapper for VFP? I mean create a class, say _VFP, that contains methods that correspond to every (most?) VFP command/function.
>
>So, instead of writing
>cText = LEFT("abc", 2)
>
>you would write
>cText = _VFP.Left("abc", 2)
>
>
>I can't count the number of times that such a layer would have saved me from having to go back and rework some code. Example: for internationalization issues I want all my LEFTs to be LEFTCs. With the wrapper, I could implement the Left() method to call LEFTC and not touch my code. I could change all my _VFP.MessageBox(...) calls to actually be implemented as a MsgSvc() call or whatever.
>
>I don't know the performance issues involved, but there certainly seem to be some merits to doing this.
>
>
>Bob
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform