Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivalents for WONTOP() etc?
Message
From
28/06/1999 21:15:42
 
 
To
28/06/1999 18:42:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00234472
Message ID:
00235037
Views:
26
>>
>>Every once in awhile, you have to wait for the system (operating and otherwise) >to complete its chores before you can go ahead with your's. I suspect that's >what you're seeing here. When I've encountered such things, I've inserted a >timing loop.
>
>they won't believe that either!
>
>I think, however, in my case its just a case of calling the routine at the wrong point in the release process. I'm trying to do a cleanup routine which releases any forms which haven't already been released (is this even necessary I suppose I should ask - or can we just issue a cancel or quit regardless and the system closes everything down for us?)
>

QUIT will release all forms and close all tables as long as a CLEAR EVENTS has been issued and no transactions/table changes are pending. The conditions noted will either pop a VFP error dialog or give a "Cannot close Visual Foxpro" error

>Anyway, for what its worth, I simple check for whatever form is 'wontop()' and call its release method. No problem except for some I'm just closing which come up as being wontop() but then when you call the release method, we get the message that it's no longer an object. Yet if we suspend at that point, not only is it wontop() but it also returns .t. for wexist. The giveaway that its in the process of disgorging itself is that its form name now has a null value rather than 'object'.
>

You need not check WONTOP(); a simple solution using the VFP Forms collection would look like:
FOR EACH oForm in _VFP.Forms
   oForm.Release()
ENDFOR
>I can't wrap my head around the concept of an object which has ceased to exist in memory but still tells the system it is the currently active window!
>
>Harry
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
Next
Reply
Map
View

Click here to load this message in the networking platform