Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CREATE CLASS alternative
Message
 
 
To
15/01/2002 13:21:11
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00604980
Message ID:
00605018
Views:
15
This message has been marked as the solution to the initial question of the thread.
>Is there a command that does the same as CREATE CLASS, but
>without opening the Class Designer? IOW: programmatically
>create a class based on another class stored in a .vcx and
>save it in the specified .vcx

As Steve posted, you can bring the designer up programmatically and close it using the keyboard command. However, I would change the code sample to use

KEYBOARD '{CTRL+W}'

This should save and close automatically, not simply attempt to close and prompt.

You could also use the SaveAsClass method of the object. If you can instantiate the object, then you can use this method to save to a specified class library. You can also specify any comments you want to be associated with the class. Ex.
lox = createobject('myclass')
lox.SaveAsClass('NewClassLib','NewClassName','NewDescription')
HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform