Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A little competition :-)
Message
From
04/12/2002 17:29:09
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00729533
Message ID:
00729650
Views:
15
I would say that since this property can be in three different states it should not be of type logical, instead declare it as some other type and have constants defined with meaningful names. Something like an enumeration.

The property could be called ButtonState and the enumeration could be:
SaveCancelState 0
EditBrowseState 1
NoDependencyState 2

Just my .02

>Hi, Mark!
>
>>>
>The name of the property should be something meaningful to you and whoever has to maintain your code should you pass it on to someone else.
><<
>
>That was my idea!
>
>
>>>
> I would call it lUseFormEditStatus.
><<
>
>Sounds not so good <s>, because this property says to the Enabled state of the button:
>- If property = .T. -> button is enabled/disabled when ThisForm.lEditMode is enabled/disabled (e.g. a "save" button or a "revert" button)!
>- If property = .F. -> button is disabled/enabled when ThisForm.lEditMode is enabled/disabled(e.g. a "edit" button or a "next" button)!
>- If property = .NULL. -> no dependency between Button.Enabled and ThisForm.lEditMode!
>
>Now the question again: What is a good name <vbg>?
>
>
>>>
> You are missing the ENDCASE. I would have code more like:
><<
>
>Oooops - you're right!
Previous
Reply
Map
View

Click here to load this message in the networking platform