Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hack VCX to add custom properties
Message
From
02/06/2008 07:52:46
 
 
To
02/06/2008 07:31:42
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01319311
Message ID:
01320922
Views:
9
Olaf --

There are a coulple of things I don't quite get about your message:

First, you say that I'll need to use WriteExpression/ReadExpression instead of just setting loXYZ.property=value. I've found that I can create a property in my baseclasses by using AddProperty and that, having done so, can assign the properties directly for all instances of this class. So, either I'm not understanding what you're referring to or you have something else in mind.

You're also referencing the use of storing expressions for properties, and I'm not sure why you are doing so --

Unless -- are you suggesting that for each object I have that I set the tooltiptext by using an expression? I've never quite understood the rules for evaluation of expressions, so I've always shied away from them. What pre-init step are you referring to?



>>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.
Jim Nelson
Newbury Park, CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform