Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding Class built by define code into a VCX
Message
De
16/07/2006 12:29:04
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
15/07/2006 20:09:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01136734
Message ID:
01136788
Vues:
16
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform