Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing all forms
Message
From
20/11/1998 17:22:51
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00159684
Message ID:
00160003
Views:
31
>Michelle, you need
>
>FOR n=1 TO _screen.FormCount
>_screen.forms[n].Release
>ENDFOR
>
>Nick

Nikolay, ne zabyvay...

We've had a problem with this about a year ago - this won't work, because you're deleting members of _screen.forms and scanning it at the same time. Kind of walking upstears and cutting the staircase at the same time. The solution was:

For n=_screen.FormCount to 1 step -1
_screen.forms[n].Release
EndFor

Or, another one, which is essentially the same - always release the last one:

Do while _screen.FormCount#0
_screen.forms[_screen.FormCount].release
enddo

Though, in case of some dependencies, there may be a case that some of the forms won't release before another form, in which case the first method will leave them unreleased, and the other will loop indefinitely. A combined iterative solution would be a real one.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform