What could I be doing wrong?
Import mojo
Class BaseClass
Field ParentThing:AppTest
Method new(a:AppTest)
ParentThing = a
End
Method show_me:void() abstract 'wanted child method
End
Class ChildClass1 Extends BaseClass
Method show_me:void()
Print("ChildClass1")
End
End
Class ChildClass2 Extends BaseClass
Method show_me:void()
Print("ChildClass2")
End
End
Class AppTest Extends App
Method OnCreate:Int()
Local Problem:BaseClass = new ChildClass1(Self)
End
End
Function Main:Int()
New AppTest
End
Now it show "<32> : Error : Unable to find overload for new(AppTest)." as the error when I compile.
If I copy the new command from the BaseClass to each of the ChildClass's then it will work, but this kind of defeats the purpose of what I am trying to do.
I really only want to define the new method once, not in each of the childs.
Any ideas?
|