Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
About the Set Classlib statements for an app?
Message
From
29/07/2009 15:28:14
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01415323
Message ID:
01415385
Views:
116
>>Is there any potential problems with the number of Set Classlib statements in app. Is it common to have so many as I do in an app, or have I gone off the deep end?
>>
>>By the way, do I actually need to call them out like this? It seems like if a form uses a control from a VCX that it will find it just fine, so now I'm wondering why I wrote all this in the first place.
>>
>>Perhaps I recall doing it so I can run PRGs or command line so I can just reference the classname without having to specify the VCX. Is that the deal?
>>
>>  *== Set CLASSLIBs ==================================================================
>>  Set Classlib To 'mylib' Additive
>>  Set Classlib To 'menu' Additive
>>  Set Classlib To 'lmbo' Additive
>>  Set Classlib To 'toolbars' Additive
>>  Set Classlib To 'ghl' Additive
>>  Set Classlib To 'GridExtras' Additive
>>  Set Classlib To 'rcsCalendar' Additive
>>  Set Classlib To 'Factory' Additive
>>  Set Classlib To 'registry' Additive
>>  Set Classlib To '_table' Additive
>>  Set Classlib To '_environ' Additive
>>  Set Classlib To '_utility' Additive
>>  Set Classlib To '_datetime' Additive
>>  Set Classlib To 'SednaMy' Additive
>>
>>
>
>Matt,
>
>I think this amount of libraries is OK. If you don't instantiate an object from these classes in these classlibs via CreateObject(), you don't need the SET CLASSLIB statement.

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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform