Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing a timer from within itself
Message
From
10/09/2007 14:51:10
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Releasing a timer from within itself
Miscellaneous
Thread ID:
01253513
Message ID:
01253513
Views:
63
I am getting a error while using the Beautify utility. So I started to review HOME() + "\tools\xsource\vfpsource\beautify\beautify.prg" when I came upon this gem on Line 337:
* We embed the timer in a form because we can release the form within
* itself but we can't release a timer within itself (prevents timer
* reference from hanging around after we're done with it)
My question is, if I attach a timer (or indeed other objects, like a custom perhaps) to the _SCREEN and then subsequently issue a
_SCREEN.RemoveObject("ObjectName")
Would that not release the object?

Furthermore, could I not subclass the timer, adding a Release method:
IF TYPE("This.Parent") = [O] AND PEMSTATUS(THIS.PARENT,"RemoveObject",5)
     This.Parent.RemoveObject(This.name)
ENDIF
RELEASE This
Wouldn't that release basically any object regardless of class?
Thank you,
- Frank
Next
Reply
Map
View

Click here to load this message in the networking platform