> Today I use VFP to improve my own productivity and distribute my work to a very small community.
>
> Foxite is a great resource for keeping me out of trouble, but someday I know I'll need to hire an expert to make my applications more robust and networkable.
>
> So I direct my query to you VFP consultants in Foxite land: What are the common coding practices that newbies make that I should avoid to make your consulting life easier?
>
> Three things I've heard on Foxite so far
>
> 1. Keep public variables to a minimum
> 2. Use Hungarian notation
> 3. Create your own subclasses of the VFP base classes
> 4. . .
> 5. . .
>
> Are there certain coding practices that make you want to tear your hair out?
>
> Dan Baker
> Effort of the Poconos, PA, USA
If you want to use public variable, just create a
_Screen.addproperty('MyPublicVariable')
.
If you want to instantiate it...
_Screen.MyPublicVariable = [Hello World!]
If you want to use its value...
_Screen.MyPublicVariable;
Now...
If you want to create your own classes...make it
generic as much as possible.
Don't forget this! What i like most in vfp is the
macro substitution (
&).
e.g.
ViewMe = "browse"
Select <tablename>
&ViewMe;
or...
SqlSelect = "Select * from Customer"
execute it....
&SqlSelect
or...
lcWhere = [lName = "Foxy"]
Select * from Customer &lcWhere
Amazing right? that's the power of vfp!!!
Christian M. Tabligan
Visual FoxPro is like a game...need to explore until you reach your goal to success!!!