> The class has a function foo that is coming from the Interface implementation > and it also calls this function. Do you mean the class "Class1" has a function foo that is coming from the "IComponent" Interface implementation and it also calls this function.
If so, then of course it will call it. That's the basics of OOP. So what do you mean "But it just does not look right" ? compilation error ? Maurice -----Message d'origine----- De : mark goldin [mailto:[email protected]] Envoyé : mercredi 9 octobre 2013 19:41 À : users Objet : Interface question I have a class: public class Class1 extends SkinnableContainer implements IComponent { } public interface IComponent { function foo(component:IComponent):void; } So, if Class1 implements IComponent it has to have the following method: public function foo(component:IComponent):void { // implementation } I am calling foo like this: override protected function childrenCreated():void { super.childrenCreated(); foo(this); } But it just does not look right. The class has a function foo that is coming from the Interface implementation and it also calls this function. Is that right? Thanks
