Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Suggested prefixes for classes and objects
Message
From
27/09/2006 11:39:03
 
 
To
27/09/2006 05:46:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01157359
Message ID:
01157531
Views:
21
>Peter,
>I agree in general. However there are few points I do different and suggest to be that way.
>1) FoxPro beautify tool reserved words and symbols 'No Change' unless you're doing it for small code snippets where you can see all code or you're sure beautify wouldn't cause hard to catch bugs. Several ways back I showed a case where beautify couldn't interpret a command line and caused hard to catch bug changing the casing. If your code has winAPI code in it you'd want to be sure their names not be touched at all.
>2) oApp vs goApp. g is redundant. oApp is a well known public variable and it's the only public variable in an application.
>3) 3 letter prefixing should not be so strict. ie: pg is just good for a page. Using btn,cmd or frm,top for same things are not good IMHO - overloading prefixes with properties. A button whether small or large is a button A form either toplevel,in top level or in screen is a form etc.
>Cetin

Thanks for the warning about Beautify.

I use a number of public variables, all of which begin with "g". Is is true that you never have more than one? I like consistency.

Same with prefixes: consistency. The three letters are a visual tipoff to me that this is a class.

Frm = form class
Pop = Type 1 SCX form
Top = Type 2 SCX form

There is a lot of difference between an SCX form and a form class. Are you sure that you would not want to communicate that difference in the name?

Thanks for the feedback.

Peter
Peter Robinson ** Rodes Design ** Virginia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform