Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing a modal form
Message
From
28/05/2023 03:37:35
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01686646
Message ID:
01686679
Views:
42
>>Old trick... you instantiate the form from a class and assign to a variable. Then have your buttons only .hide() the form, not close it. Then in the calling code you still have a reference to your form, can access its properties. Then you can release the variable when done (or if it's a local one, do nothing, it'll release when the code exits).
>
>Sorry I am not getting it. Again, in my case - now - the popup form is MODELESS. As soon as the code in this, POPUP MODELESS form, calls .hide(), the method DEACTIVATE is fired. And therefore, the .tag is gone. That is, as soon as hide() fires, the code (in the debugger) goes to the READ EVENTS line.

The above was for a modal form. In a modal form no other code runs unless specifically called from the form itself - no other interaction is possible (except what's on the app's own header, maybe toolbars and menus). Modal form practically hijacks the event loop. So you either do stuff in the form (but then the form needs to know too much about the rest of the app), or you keep it alive but hidden, harvest the values from it and only then release it.

With a modeless form it's different, because, just like you said, when the code in the form exits, processing goes back to the event loop (i.e. Read Events). So you need to do stuff in the form itself - either trigger some action outside of it, to read the values from the form (pass a reference to the form to some code where you'll process it, perhaps?), or do what you need in the form itself.

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