Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Restore Default Property Value
Message
De
13/04/2001 11:50:23
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00495250
Message ID:
00495319
Vues:
11
Good point. Thanks Larry. Do you know off hand if this behavior is the same in VFP7? Obviously it would be nice if even user defined properties could be reset to the "default" value.

Bill
>
>One thing to watch out for is using this method on user-defined properties. There really is no "default" value for user-defined properties. If you use ResetToDefault, you will end with the property being set to a logical .F..
>
>Ex.
>clear
>ox = createobject('cusDefault')
>? ox.NewProperty  && displays 27
>ox.ResetToDefault('NewProperty')
>? ox.NewProperty  && displays .F.
>return
>
>define class cusDefault as custom
>   NewProperty = 25
>   procedure Init
>   THIS.NewProperty = 27
>   endproc
>enddefine
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform