--- In [email protected], "wpding" <[EMAIL PROTECTED]> wrote:
>
> I want to override a method of a super class. and I can use
> super.method to invoke the corresponding method of the super class.
>
> But how i can call a method of the super  super class.
> for example.
> Class A{
>   protected function myMethod(){}
> }
> Class B extends A{
>   override protected function myMethod(){}
> }
>
> Class C extends B{
>   override protected function myMethod(){}
> }
>
> Is it possible to call A.myMethod in the function C.MyMethod?
>
> Thanks
>
Yes, exactly how you wrote it.  However in order to have the top level
function actually run before adding methods etc... with level 2 you need
to call super.myMethod(); from B or not override it at all in B to be
able to access it's functionality from C.  In other words, if you
override a function and then try to override it again in a class
extending the one with the original override and don't call the super
version in the intermediate class then you end up with an empty function
at the end.

JjB

-#As always I could be completely wrong, but it's not likely#-

Reply via email to