I think that the workaround you did is a piece of code which should be
there anyways, concidering Good practise. So I'm sort of suprised to see
this working in the flashIDE without your so called 'workaround'.
Cause B is the super of C and A is the super of B, B should say so too A
just my 2 cents
Folkert
Simen Brekken wrote:
> I've encountered a problem where I cannot get the super statement to behave
> correctly, it works as intended in the Flash IDE but not when compiling via
> MTASC, take the following example:
>
> class A {
> public function set items(list:Array):Void {
> trace("A.items = " + list);
> }
> }
>
> class B extends A {
> }
>
> class C extends B {
> public function set items(list:Array):Void {
> super.items = list;
>
> trace("C.items = " + list);
> }
> }
>
>
> This compiles and works in the Flash IDE, however in MTASC the super is not
> working retroactively to finally trigger the A.items setter.
>
> I've (for now) solved the problem by introducing a dumb setter in B:
>
> class B extends A {
> public function set items(list:Array):Void {
> super.items = list;
> }
> }
>
> When this work around is introduced it works as intended in MTASC as well.
> Am I right thinking this is a bug in MTASC's way of handling super?
>
> --
> Regards,
> Simen Brekken
>
>
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org