Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Restore Default Property Value
Message
From
13/04/2001 11:50:23
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00495250
Message ID:
00495319
Views:
10
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform