[FlashCodersNY] Supersiliousness

Mark Armendariz lists at enobrev.com
Fri Aug 15 10:41:32 PDT 2008


um... "a good tip"... sorry.

On Fri, Aug 15, 2008 at 1:40 PM, Mark Armendariz <lists at enobrev.com> wrote:
> On Fri, Aug 15, 2008 at 11:57 AM, Bruce Epstein <bruce at zeusprod.com> wrote:
>> However, you might not have realized that, by default, the implied
>> "super()" statement is the first statement in the constructor, which
>> means that the superconstructor executes before the code in your
>> subclass's constructor.> In AS3, if you want the superclass constructor to be invoked at the
>> *end* of your subclass constructor (rather than before), simply put the
>> super() command at the end of your subclass constructor().
>
> Had to test this one for myself, since I'd been calling super
> explicitly in my constructors.  Hadn't realized it would automatically
> call it for you.  I think I'll keep the explicit calls in as a
> reminder of what's going on, but 'tis a good top no less.
>
> On Fri, Aug 15, 2008 at 12:02 PM, Tim Beynart <timbeynart at gmail.com> wrote:
>> I thought the compiler would barf if you didn't call super() first?
>
> Not at all.
>
>
> Mark
>



More information about the FlashCodersNY mailing list