Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hack VCX to add custom properties
Message
From
24/05/2008 09:22:36
 
 
To
24/05/2008 07:31:19
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01319311
Message ID:
01319343
Views:
13
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.

>>Is there some simple way to hack a VCX to add custom properties to a number of the classes defined there?
>
>I would not hack the vcx as data. Also you would normally add properties to a base class only.
>
>Travers a project with for each loFile in _vfp.Activeproject.Files. Check for files of type classlib (loFile.Type="V"), Use AVCXCLASSES() to get a list of classes of a vcx file (loFile.name). Use ACLASSES() to find ancestors/parent classes of a class.
>
>When you found the root classes
>
>MODIFY class xyz of some.vcx nowait
>ASELOBJ(laXYZ)
>loXYZ=laXYZ(1)
>loXYZ.AddProperty("newproperty")
>..
>
>You may previously check if a property already exists with AMEMBERS(). It's all there, you don't need to hack data.
>
>Bye, Olaf.
Jim Nelson
Newbury Park, CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform