Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hack VCX to add custom properties
Message
De
24/05/2008 09:22:36
 
 
À
24/05/2008 07:31:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01319311
Message ID:
01319343
Vues:
14
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform