Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using constants as property default values
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00452711
Message ID:
00452724
Vues:
19
>In some of our code, we have carry out certain bits of code based on a property value (eg. in our error logging routine, I log different information based on the value of a property in our error object). There are only a small set of valid values for this property and so I've #define'd the values in our header file.

The problem is that constant values don't exist at design time, so you can't use the property sheet to assign a constant value to a property. If you need to do this, put code in the object's init to set the property to the value of the constant.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform