Use intellisense.
The root object is the public variable otimerob defined by line 1. It's a 'mytimer' class instance by line 2.
But that is not a timer itself, it's a container control. That's the first questionable thing, but it is, what it is. Just look at the class definition lines 4-6, there's your container that has an object inside it. And that object also is called otimerobj. But that doesn't mean Add object adds itself to itself. It just means that the public variable otimerobj in a container that has a Timer inside as otimerobj.otimerobj.
So your access to the code timer is otimerobj.otimerobj and the interval property is
otimerobj.otimerobj.interval.
When you don't see that, when you have a hard time understanding that code, you still should spot by just reading lines 1 and 2, that the code creates a variable otinmerobj. And this variable is not added to _VFP or _SCREEN. Ir exists independent of anything. And intellisense will guide you, if you make a testrun in the command window:
There's a lot of further properties and methods in the way to this subobject, but you see it's there.
As that PRG seems to be a part of a framework you use and is makes AppBaseTimer.prg I don't think you're supposed to make use of it. The framework makes use of it. And as it's based on a public variable, you can only have one tuner like that, which I guess the application object of that framework already will use itself. Calling that PRG more than once will just override the public object with itself.
If you want a timer, than write your own timer class and create that where you want it. What makes no sense is to create the base class "Timner" as that has no timer code and you can't add that code at runerime, So unlike other classes you can build up from the scratch like a base form. So please, just really learn how to define a class either as here in PRG code or also as a class within a class library, because tinmers actually need to be defined in a project before you create them at runtime. You don't get around with oRimer = Createobject("timer") and then setting timer procedure code.
You don't have to learn much, as that PRG already gives you an example starting from line 8 - Define Class timerclock As Timer - and going forward until an ENDDEINE. Just ensure your copy of that code in your own PRG uses another class name than timerclock, because same names for several class definitions will make it a casino game what CREATEONCJET("timerclock") will create. Class names have to be unique within a project to not get in trouble. And if you have that and give it your own Timer procedure code, don't make use of the construct this framework code uses of a public variable. Add this timer where you need it. As single timer in _screen or as timer per form or per container of something.
In fact this latter thing - adding the timer to a form or container - is much easier, if you create a classllb (VCX) and a timer class of it. Then - at design time of a form, you can drag a timer class from that library onto your form where it will become thisform.timer1 or in general a timer1 object of the part you drag it to. Amd if you don't know what that means, learn to use the visual designer, the form and class designer.
Bye, Olaf.
Olaf Doschke Software Engineering