Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
About the Set Classlib statements for an app?
Message
 
 
À
29/07/2009 15:28:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01415323
Message ID:
01415388
Vues:
80
>But one of my points was, that I have a form that uses a class from a lib that is not in that list, yet it still seems to run fine, so that makes me wonder why the list is needed if a form can find his classes anyway. As I said, I suspect it has to do with making it easier to code a PRG by just saying CreateObject('someclass'), and since the class lib is set already it can find it. I think that is correct.

Matt,

Perhaps I have a problem explaining. You do not need SET CLASSLIB statement if you're using a visual class on the form (added in design time). Only if you want to add a class in run-time with CREATEOBJECT() function (or AddObject method) you would need SET CLASSLIB. In fact, that's the only purpose of having this statement.

You don't need it at all, if you're using NEWOBJECT() function / method in your code.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform