Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating Object skips Thisform.Release()
Message
 
 
À
11/06/2003 12:57:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00798705
Message ID:
00799156
Vues:
49
Bill,

The form (or more generically any container) can't finish destructing until all of it's contained objects destruct.

An object can not finish destructing until there are no object references to the object.

Your command button can't destruct because you've put it in a "deadly-embrace" situation with the hyperlink. They both have object references to each other so neither one can cleanly destruct unless you use the code I posted a couple of messages back in both the button and the hyperlink.

>I believe I understand the concept of an orphaned or dangling object. But this seems to be different.
>
>I do something like this:
>
>button.method()
>  lo = createobject(HyperLink)
>  this.oHyperLink = lo
>  lo.addproperty('oCreator',this)
>endproc
>
>When my code reaches the line "THISFORM.Release()" it just skips over the line. The Form.Release() method is never executed, but the variable that the form is linked to becomes .null.
>Normally when I'm leaving a reference to an object, at least the Form.Release() is executed, it's just that the form doesn't leave the screen.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform