Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Naming convention, the keynote at the
Message
De
13/04/2009 08:08:00
 
 
À
11/04/2009 17:08:43
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01394369
Message ID:
01394529
Vues:
66
>[this started as a footnote to message #1394363, but it didn't feel right to pour this on Evelyn just because I happened to be replying to her at the moment. Could be anybody.]
>
>"Command1" is a very bad name. I can't imagine a button where .click() contains of "thisform.do1()" - one is not a verb, not an action, so not knowing what your button is doing, other than it needs to show/hide other buttons, I can't conclude anything from its name.

FWIW, if you use the Toolbox to drop controls onto forms and classes, it offers a really easy way to make sure that you rename each control as you go.

In the Toolbox, right-click on a control class and choose Properties. Then, click on the Add button next to the Properties editbox. In the Set Object Property dialog that appears, choose Name from the dropdown and then for the Value, specify "(InputBox())" (without the parens and you can add additional params if you want). That'll prompt you to name the control as you drop it. One thing you might want to do is specify part of the name as the default value, for example, "cmd" for a button. Click OK twice to get out and from then on, when you put that control on a form or class, you'll be prompted. Bit of a PITA to set it up for every class in the first place, but do it once and you're good.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform