_screen.AddObject( "test1", "myTimer" ) define class myTimer as Timer Interval = 10000 function Timer() ? "fired" this.Parent.RemoveObject( this.Name ) endfunc enddefineyou can use this.parent to get a nameless reference to it's container.
function Timer() ? "fired" release this endfunc>Would this be considered anti-OOP because the timer is ASSUMING that it is added to the _Screen? (ie: it is NOT completely encapsulated)
>_Screen.AddObject('myTimer','myTimer_Class','myWindow',_Screen) > >myTimer.Init(cWindowToCheck,oContainer) >if vartype(oContainer)<>'O' > return .f. >endif >this.oContainer=oContainer > >myTimer.TimerEvent() >... >this.oContainer.RemoveObject(this.name) >>but it seems like overkill.