Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug With AddProperty?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01163773
Message ID:
01163774
Views:
9
Never mind. I just found this in the help:

For object instances derived from native Visual FoxPro classes, ADDPROPERTY( ) respects the visibility setting of the intrinsic AddProperty method. If AddProperty is marked as Hidden or Protected, ADDPROPERTY( ) does not create the new property and returns False (.F.). If the AddProperty method is marked as Public (default), ADDPROPERTY( ) creates the property and returns True (.T.). This protects the original class design.





>If you hide the add property method on a class, then the ADDPROPERTY function
>won't add a property to the class:
>
>
>
>oRecord = CREATEOBJECT('RecordBase')
>
>ADDPROPERTY(oRecord, 'LastName', 'Smith')
>
>RETURN
>
>
>
>
>DEFINE CLASS RecordBase AS Session
>
>  HIDDEN addproperty	&& This causes the ADDPROPERTY function above to fail
>		
>ENDDEFINE
>
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Reply
Map
View

Click here to load this message in the networking platform