Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This is probably impossible, but...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00279088
Message ID:
00279264
Vues:
15
>>>>Ed,
>>>>
>>>>>>...the sequence QueryUnload/Destroy/Unload is invoked by releasing the last object ref or RELEASE/CLEAR type commands issued outside the form or the default SHUTDOWN event for VFP.<<
>>>>
>>>>Releasing the last object ref to a form, or RELEASE/CLEAR commands issued outside the form do NOT fire either the RELEASE or the QUERYUNLOAD, in my testing. It jumps straight to Destroy.
>>>>
>>>>DO FORM test NAME oForm LINKED
>>>>oForm=.NULL. *or* RELEASE oForm --> go straight to DESTROY.
>>>>
>>>>The default Shutdown, as you mentioned, does fire QueryUnload.
>>>
>>>It seems to on mine at least - put a NODEFAULT, thisform.Show() and a WAIT WINDOW 'Got to QueyUnload' in the QueryUnload and it'll fire - you may be ending up with a dangling object...
>>
>>Hi Ed,
>>
>>QueryUnload fires only under the following circumstances: CLEAR WINDOWS, RELEASE WINDOWS, or QUIT commands are encounter or the user selects the close option from the control menu or the use clicks the close (X) box. It doesn't fire when ThisForm.Release is issued. That's why any issuing of ThisForm.Release often is done in this fashion:
IF ThisForm.QueryUnload()
>>  ThisForm.Release
>>ENDIF
>
>yes, I know that explicitly firing the Release or issuing the RELEASE WINDOW or CLEAR WINDOW inside the form always fires release and doesn't fire QueryUnload...

Nope, QueryUnload fires with RELEASE WINDOW or CLEAR WINDOW even fired from inside the form or any control on it.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform