Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OForms.Remove(mymodalform)
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
OForms.Remove(mymodalform)
Miscellaneous
Thread ID:
00654658
Message ID:
00654658
Views:
53
There is an "inconvenience" (I'm not going to call it a bug) in 7.0.

I have some modal forms that return .F. in the init.
DODEFAULT() && this registers the form
...
If llDontRunThisForm
     RETURN .F. && this exits the form without unregistering
EndIf
Then it won't let me back into the form. Normally, the form would get unregistered in DoForm or the Destroy, but neither of these get processed when the Init returns .F.
The obvious fix is to put the IF before the DODEFAULT(). But there *may* be some unforseen instances where I need to DODEFAULT() before the IF. Then I would have to remember to unregister the form before returning .F.
IF NOT DODEFAULT() && this registers the form
     * Can I be *absolutely* certain that the form did not get registered?
     RETURN .F.
ENDIF
...
If llDontRunThisForm
     goApp.oForms.Remove(this)
     RETURN .F. && this exits the form without unregistering
EndIf
Is this the only way or is there a better way?
Next
Reply
Map
View

Click here to load this message in the networking platform