Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Destroy events out of order?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
01170979
Message ID:
01171388
Vues:
7
Indeed. Thanks David.

>Mark,
>
>You don't really need a flag, if you set the reference to .NULL. when you're done with it. Then you can just isnull() test the reference before using it.
>
>>I cannot see where the dependency is happening, but the problem must be what you are suggesting or some variant thereof. At issue in my mind is that I can find no evidence of either residual stack frames or object references pertaining to form B that would prevent its _immediate_ destruction, rather than after A is destroyed. But as Rummy says, absence of evidence is not necessarily evidence of absence, and I may just not know of some things not known even though I do know of some known unknowns.
>>
>>The workaround I'm using is pretty simple: Extract that code dependent on the back-reference to form A, and put that code into its own form-based method. Set a form-based flag to indicate/control that it runs only once. Call the method from both the the Click() of the cancel, as well as from the destroy. The call from the destroy event so that cleanup occurs whenever user closes the form via the closebox or VFP exit.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform