Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Class built by define code into a VCX
Message
From
16/07/2006 12:29:04
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
15/07/2006 20:09:53
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01136734
Message ID:
01136788
Views:
15
>I haven't played with creating classes by program code much. How would I add a class created with "define class xxx as custom" to a class library. I have created the class by code but I would like to add it to a class library.

For any practical purpose, the .prg is your class library. You can pass the prg name as the classlib in any newobject() call.

Now if you wanted to drop it onto your visual class... you can just do a this.newobject("oObj", "mycustom", "mycustom.prg") in the .load or .init of your visual class, and you're done. The visual representation of the custom class on a form or class in design mode isn't much anyway, and if you have more than 2-3 of these, you don't know which is which anyway until you check their properties. Which is why I didn't count this among the "practical purposes".

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform