Hi Sidney,

You have of course tried the obvious:

 super.apply(this, args)

How did it fail, compiler error or?

Regards,
Morten Barklund

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sidney de Koning
Sent: Thursday, June 26, 2008 4:30 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Calling super.apply

He Jer,

In the docs it says: public dynamic class Array
So you can extend it. My problem is that now i have to use push() to  
get items in and i want to use the constructor to pass through items,
like so var blah:ArrayInterator = new ArrayIterator("1", "2","3");

My constructor uses ..rest so with apply i pass though all the  
arguments one, by one instead of as one big array because ...rest is  
an array itself

Does this all makes sense?

The problem is that i cant seem to figure out how to call apply on the  
super.

Does any body know? let me know!!!

Cheers, Sid


On Jun 26, 2008, at 3:31 PM, Jer Brand wrote:

> I'm probably wrong (and mostly want to know as well), but I didn't
> think you could extend the Array class. Not that AS won't let you do
> it, but it doesn't actually work. I know this is the case with AS2,
> but am only guessing that it's the case with AS3 from the behavior you
> describe.
>
> My suggestion would be to use composition rather than inheritance.
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to