`
OOP: Creating a reference to a class and interface 2004-01-10 -- Jim Gambon Newsgroups: comp.lang.clarion > I'm trying to do something like this: > > schedule &ScheduleInterface > .... > schedule &= new(ScheduleRoundRobin) It would be more like this: schedule &ScheduleInterface scheduleRoundRobinInstance &ScheduleRoundRobin ...... scheduleRoundRobinInstance &= new(ScheduleRoundRobin) schedule &= scheduleRoundRobinInstance.ScheduleInterface ..... schedule &= NULL DISPOSE(scheduleRoundRobinInstance) Remember, an Interface is just a "contract" that the documented methods are available. You still need an instance (the "object" in memory) of the class that implements those methods. Regards, Jim Gambon Printed November 23, 2024, 6:09 pm This article has been viewed/printed 35365 times. Google search has resulted in 2 hits on this article since January 25, 2004. |