Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Object skips Thisform.Release()
Message
 
 
To
10/06/2003 20:46:26
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00798705
Message ID:
00798708
Views:
36
Bill,

Your button holds reference to the HyperLink object which in turn has reference to the button. Add in the button destroy
this.oHyperLink.oCreator = Null
to remove reference to the button.
Take a look at http://www.geocities.com/df_foxpro/qoop017.htm for detailed explanation.

>I'm using VFP 7.0
>
>I have a button in a container on a form.
>(I've abbreviated this code, but I think I have what's pertinent)
>
>button.method()
>  lo = NewObject('HyperLink')
>  lo.oCreator = this          << this is the line that causes the problem
>  this.oHyperLink = lo
>endproc
>
>After creating the object, Thisform.Release() is skipped - no error - no nothing. When I debug, the trace window points at the line but then skips to the next line.
>If I take out the line, then it works fine.
>
>I can't see that it's any different than the oHost property in SetObjRef.prg.
>In reality I'm adding the oCreator property inside a modified SetObjRef in the exact same manner as oHost is created.
>
>TIA
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform