Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a class and set its properties programatic
Message
 
 
To
16/05/2002 18:17:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00657845
Message ID:
00657959
Views:
31
Alex,

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.

>How can I create a class and set its properties programatically without hacking the VCX file?
>
>CREATE CLASS ... NOWAIT starts the class designer and continues with program execution, but I don't know how to get a reference to the object being created in order to set its properties as well as add other objects to it, and finally to close the design window.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform