Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A little competition :-)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00729533
Message ID:
00729655
Vues:
18
Sorry didn't read your reply before, I was suggesting a similar approach.

>Hey Sebastian,
>
>I would choose a totally different approach < vbg >:
>
>Make the property numeric and call it nEditModeBehaviour. Allow values from 0 to 2 and put the value descriptions in the property description. This would IMO be better to understand. And you can extend to more behaviours in the future. The whole thing seems more like an enumeration to me.
>
>Regards,
>Armin
>
>>Hi, folks!
>>
>>Here is a little "competition" <vbg>:
>>
>>I have a class called "MyButton" with a property "xyz"!
>>
>>In the refresh event I put the following code:
>>
>>PROC Refresh
>>WITH This
>>	DO CASE
>>	CASE ISNULL(.xyz)
>>		* nothing to do
>>	CASE .xyz = .T.
>>		* set enabled state to the same value of forms editmode
>>		.Enabled = ThisForm.lEditMode
>>	CASE .xyz = .F.
>>		* set enabled state to the opposite value of forms editmode
>>		.Enabled = (NOT ThisForm.lEditMode)
>>ENDWITH
>>ENDPROC
>>
>>
>>Now the question: What is a good, proper, correct name of the property "xyz"?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform