Absolutely, but I'd never have been trapped as I didn't understand
overriding properly ;)
 I wasn't aware that when a subclass overrides a superclass method it leaves
the superclass method intact. Is that correct?
  On 11/17/05, Ian Thomas <[EMAIL PROTECTED]> wrote:

>
> Not just more readable - consider the case where you're overriding
> something:
>
> class A
> {
> public function doSomething()
> {
> trace("Something in A");
> }
> }
>
> class B extends A
> {
> public function doSomething()
> {
> super.doSomething();
> trace("Something in B");
> }
> }
>
> In this situation, using super.method() lets you call the parent
> implementation of the method you're currently in. If you were limited to
> this.method(), then you'd be trapped in an infinitely recursive loop as
> the
> method kept calling itself...
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to