Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Please confirm this for me - CLOSE ALL
Message
From
11/03/2005 17:25:30
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
11/03/2005 17:14:50
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00995029
Message ID:
00995047
Views:
13
>>>Hello all.
>>>
>>>I been do foxpro for years now and I just discover something.
>>>I never knew "CLOSE ALL" statement affects "SET CLASSLIB..." statement.
>>>
>>>Is this true?
>>
>>CLOSE ALL or CLEAR ALL are both quite drastic - closing a lot of things - and should never be used, except close to the very beginning and very end of an application.
>
>So you agree.
>
>I never thought it wiped out "set classlib to ..." statement tho.

I never gave much thought about what command does what - I used the combination CLOSE ALL / CLEAR ALL to get a "clean slate". I would expect this combination to clear almost everything, including a SET CLASSLIB. But from the list of functions each command performs, it would seem more logical for CLEAR ALL to clear the classlib, and not CLOSE ALL.

However, it is easy to test that it does, indeed, close the classlib. Just create a classlib, and then:
set classlib to "abc"
? "Before close all:", set("classlib")
close all
? "After close all:", set("classlib")
(Tested in VFP 6.)

It looks like this command is doing too much - but then again, I would use CLOSE ALL and CLEAR ALL only at the start of an application, not in the middle of it.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform