Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating Object skips Thisform.Release()
Message
De
10/06/2003 22:02:12
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00798705
Message ID:
00798725
Vues:
36
Hi David,
I did the code in the button destroy, and it had no effect.

How is this different than the oHost property/object in SetObjRef.prg? It's storing a reference to the form on the object inside the form. But there isn't any special handling of the object at the form level.
I haven't looked at the article yet (missed it when I read his message). I'll look at it tomorrow.

Thanks

>Bill,
>
>Did you look at the article on my website that Sergey pointed you to?
>
>You have a dangling object reference. The form can't destruct because the button can't destruct because the hyperlink has an object reference to the button which has an object ref to the hyperlink.
>
>You are going to have to explicitly code to handle this interlinked relationship in both the button.Destroy:
>
>if ( type( "this.oHyperlink" ) == "O" )
> this.oHyperlink.oCreator = .null.
> this.oHyperlink = .null.
>endif
>
>And to be safe in the Hyperlink.Destroy:
>
>if ( type( "this.oCreator" ) == "O" )
> this.oCreator.oHyperLink = .null.
> this.oCreator = .null.
>endif
>
>Of course this code is bad from the context that both classes are requiring intimate knowledge of the other class. I'm not sure why you'd want the hyperlink know what created it.
>
>>I just discovered that even though the Form.Release() doesn't execute, the form object no longer exists.
>>ie: Do form myForm, creates an object myForm
>>after the Form.Release() is issued myForm is .null., even though the form is still on my screen.
>>I presume that's an indication that there's a dangling object somewhere. But how do I get a destroy method to destroy it if no destroy()s ever run.
Bill Morris
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform