Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Screen resize code
Message
From
12/10/2006 10:36:43
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01160765
Message ID:
01161456
Views:
12
I believe David Frankenbach wrote a program to check for outstanding references. The file can be found at: http://www.geocities.com/ResearchTriangle/9834/qoop017.htm



Glenn

>>>I have implemented screen resize code using http://fox.wikis.com/wc.dll?Wiki~ScreenResize
>>>
>>>Here is the code:
>>>
>>>
>>>_Screen.AddObject("oResizer", "Resizer")
>>>
>>>DEFINE CLASS Resizer AS Custom
>>>     oScreen = _Screen
>>>
>>>     PROCEDURE oScreen.Resize
>>>          WAIT window "Resizing" NOWAIT
>>>     ENDPROC
>>
>>*--------------------------------------------
>>*  You can add a garbage collection method to your class
>>*--------------------------------------------
>>      Procedure Destroy
>>        this.oScreen = .null.
>>      EndProc
>>*--------------------------------------------
>>
>>
>>
>>>ENDDEFINE
>>>
>>>
>>>At the end of the program, this runs:
>>>
>>>If Vartype(_Screen.oResizer) = 'O'
>>
>>
>>* Add this to remove hanging reference
>>*---------------------------------------------
>>       _Screen.oResizer.oScreen  .Null.
>>*---------------------------------------------
>>
>>>	_Screen.RemoveObject("oResizer")
>>>Endif
>>>
>>>
>>>It does run the RemoveObject line. However, if I BUILD the application again, it gives me this error:
>>>
>>>File cannot be closed because outstanding references exist.
>>>
>>>
>>>If I exit FoxPro, and restart, then BUILD works fine. Removing all the above, then BUILD works without a problem.
>>>
>>>Any idea what I can try to avoid the outstanding references error?
>>>
>>>Cyril
>>
>>Glenn
>
>
>Glenn
>
>I tried your solution to add Procedure Destroy. However, I still get:
>
>
>File cannot be closed because outstanding references exist.
>
>
>I made a small little test project and your solution works fine for it.
>I don't know why it doesn't help with my own project.
>
>Is there any way to find out what the "outstanding references" are that are causing my problem?
>
>Cyril
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform