Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find and Close all Instantiated Forms
Message
From
03/12/2008 17:02:24
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
03/12/2008 16:23:04
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01365406
Message ID:
01365411
Views:
19
>Hello all. I have a timer that forces our Mere Mortals application to close. To ensure a graceful exit, I need to check for any forms open in the application and possibly call their unload/release etc event.
>
>I have seen goApp.oForms.GetFormCount() used, and a FOR loop as such:
>
>>>FOR EACH oForm IN _screen.Forms
>** do some magic to find form name and close it?
>
>
>I am having issues with a graceful (cannot access selected table errors) exit when simply calling OnShutDown() with an open form.

The "cannot access selected table" seems to happen with CodeBook based frameworks - when you close the cursor on which a combo/listbox is based, and then the framework tries to refresh it while closing the form - it tries to requery(), probably, and doesn't find the alias, and you get that error.

I had this problem with VFE, and knowing that MM is also CodeBook by origin, I'd assume it may suffer from the same problem. You may just try to set all combos' and listboxes' rowsource to "" somewhere in form's destroy() or unload() (whichever fires first). Too bad this didn't cross my mind six years ago when I had that problem - now I can't try it out.

back to same old

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

Click here to load this message in the networking platform