General information
Category:
Forms & Form designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only