Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set classlib to ...
Message
From
24/01/2000 18:24:34
 
 
To
24/01/2000 18:03:36
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00321904
Message ID:
00321919
Views:
18
>Thanks for your input, but I don't think issuing the 'set classlib ...' again.

What about doing another SET CLASSLIB in another section of your code, to reference another library? If you do this, and do not use the ADDITIVE clause, the current libraries referenced by your SET CLASSLIB are lost - replaced by the new reference, rather than extended to include it.

You can always save the current state of the classlib list by saving the return of SET('CLASSLIB') to a memory variable, and then resetting it at a later point. The following is terrible coding practice, using both a PUBLIC variable and needless macro expansion out of sheer stupidity, and I'd feel obligated to kill or sterilize any programmer working on one of my projects who did this, but that's a personal problem...
PUBLIC gcClassLibList  && this would immediately get the programmer killed

gcClassLibList = SET('CLASSLIB')

*  later, somewhere in the code, just waiting to ruin my day:

IF TYPE('gcClassLibList') = 'C' AND ! EMPTY(gcClasslibList)
   SET CLASSLIB TO &gcClassLibList
   *  If the programmer were still alive at this point, I'd make
   *  certain they didn't reproduce to protect future generations
ENDIF
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform