Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create a class and set its properties programatic
Message
De
17/05/2002 01:12:06
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00657845
Message ID:
00657996
Vues:
34
>Here's some code that should get you started:
>
>
create class x1a of x1 as custom
>aselobj( lax, 1 )
>lax[1].addproperty( "testprop" )
>lax[1].testprop = "Hi there"
>lax[1].writemethod( "testmethod", "return .t.", .t. )
>
>
>I don't know that there's a way to get method/property comments like this. That would take a hack into the VCX, but you can easily do that after you've got the class created and saved in the VCX.

Thank you Sergey and David, this is what I was looking for. Both approaches are super powerful.

David's has the advantage that it can change method text, if one needs that, although I haven't figured out how to close the class designer.

Thanks to both again. I wish I could give 3 stars to each.

Alex
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform