Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Naming conventions for custom methods?
Message
De
17/11/2008 09:43:30
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
17/11/2008 07:27:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01362229
Message ID:
01362311
Vues:
17
>>
>>lUsesVCR()
>> return Vartype(this.oPageFrame)='O'
>>
>
>No, it's not common. It's more common to use some kind of word that signals something about the return value, so your example would be UsesVCR() or HasVCR(). The word "Is" is often the first word in a method name for one that returns a logical.

For methods returning some information about the parameter passed, I've found I began to like the IsA...() notation that the Feltmans use. IsA(toObj, tcClass) simply returns .f. if the second parameter is not among first parameter's class or one of parent's classes.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform