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:
00729581
Vues:
17
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"?

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform