Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This bug has me stumped.
Message
 
 
To
09/08/2003 17:14:18
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00818607
Message ID:
00818626
Views:
23
Hi Bill,

Tracing your code in the debugger shows that MyProc code execution continues after myForm2 Init is complete but before Destroy is fired. One of the way to fix the problem is to move
THIS.oCalling_Form.oBrowser = THIS.oBrowser
to the Init from Destroy.

>Hi Sergey,
>Nope, I just forgot to put that in my message. I did clear the reference in my app.
>
>
>>Bill,
>>
>>I don't know if it's relevant to your problem but you forgot to clear reference to the calling form. Add to Destroy of myForm2
this.oCalling_Form = Null
>>>I'm using VFP 7.0
>>>I have a bug that doesn't show up when breakpoint is set, and crashes VFP when a breakpoint is set.
>>>
>>>define class myForm1
>>>  oBrowser = .null.
>>>
>>>  procedure myProc()
>>>    do form myForm2 with this
>>>    return ! isnull( this.oBrowser )
>>>
>>>define class myForm2
>>>  oBrowser = .null
>>>  oCalling_Form = .null
>>>
>>>  procedure init( oCalling_Form )
>>>    this.oCalling_Form = m.oCalling_Form
>>>    this.oBrowser = createobject( 'InternetExplorer.Application' )
>>>
>>>  procedure destroy()
>>>    this.oCalling_Form.oBrowser = this.oBrowser
>>>
>>>1. During runtime myProc() returns .f. and I check the watch window and myForm1.oBrowser=.null.
>>>
>>>2. I open the watch window (no breakpoints) and run it again - same results.
>>>
>>>3. I open the watch window and set a breakpoint on myForm1.oBrowser and run it again - it stops on the correct line in myForm2.destroy() and shows myForm1.oBrowser = object.
>>>I close the trace window and continue.
>>>myProc() returns .T.
>>>When I close the watch window I get a fatal error and a message to send it to MS.
>>>
>>>Where do I start looking?
>>>
>>>TIA
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform