Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hack VCX to add custom properties
Message
From
02/06/2008 07:31:42
 
 
To
24/05/2008 09:22:36
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01319311
Message ID:
01320915
Views:
12
>Thanks -- that'll help quite a bit. I don't have that many base classes I have to modify, so your little code snippet has been quite helpful.
>
>Would that there were something as easy for methods.
>
>>MODIFY class xyz of some.vcx nowait
>>ASELOBJ(laXYZ)
>>loXYZ=laXYZ(1)
>>loXYZ.AddProperty("newproperty")

One more thing: To modify property values, you'll need to use the WriteExpression() method (and ReadExpression to read the value). You can simply set loXYZ.property=value, but that does not change the property value saved. That way you can store such things as =somemethodcall() as the value of a property, so the class designer rather stores expressions for properties, not values. They're evaluated in a pre-Init step when instanciating classes.

Bye, Olaf.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform