Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
QueryUnload and Release Thisform
Message
 
 
To
16/12/1999 20:40:41
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00305043
Message ID:
00305440
Views:
23
Ed...

This brings up an interesting question...

Do you advocate RELEASE formvar or formvar.Release ?????

Bascially, if you tell the guy to not use RELEASE formvar, and instead, use the Release Method, then code like this can exist in the form


PROCEDURE QueryUnload
lParameters lByPassRelease
Local lRetVal
Messagebox("queryunload")
lRetVal = .T.
*/ Check stuff here and store result to lretval
NoDefault
If lRetVal And !lByPassRelease
This.Release(.T.)
Endif
ENDPROC


PROCEDURE Release
lParameters lBypassQueryUnload
Local loktorelease
loktorelease = .T.
NoDefault
If !lBypassQueryUnload
loktorelease = This.QueryUnload(.T.)
Endif
If loktorelease
Messagebox("release")
DoDefault()
Endif
ENDPROC

It makes for encapsulated functionality... Combinations of NODEFAULT and DODEFAULT() make for some powerful capabilities....



>>If issuing a Release command/method will not trigger QueryUnload, what best option should I have to handle the 'save before quitting' routine.
>
>You should intercept both user action (click on top-right box) in QueryUnload and programmatic closing (RELEASE ...) by adding some messagebox right before this command.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform