You probably have to cast the class - i know mtasc is super strict about
that.
Something like .... :
var b:B=B(this);
b.dothis();
> hi Chris,
>
> mtasc behaves the same.
>
> i've had a look with flasm, it explicitly calls A.dothis() in A.doit.
> writing this.dothis() isn't possible because it's a static function --
> there is no object "this" could refer to.
> there is, as far as i know, nothing you can do about it except to work
> around it by either cutting'n'pasting doit from A, or using a
> singleton instead.
>
> instinctively, i would agree with you and expect B.dothis to get
>
called when i call B.doit, though.
>
> mark
>
>
> On 1/16/06, Chris Velevitch <[EMAIL PROTECTED]> wrote:
>> I have 2 classes, A and B. B extends A:-
>>
>> class A {
>>
>> private function A(){};
>>
>> public static function doit() {
>> dothis();
>> }
>>
>> private static function dothis() {
>> trace("A.dothis");
>> }
>>
>> }
>>
>> import A;
>>
>> class B extends A {
>>
>> private function B(){};
>>
>> private static function dothis() {
>> trace("B.dothis");
>> }
>>
>> }
>>
>> and when I call B.doit(), the trace output is:-
>>
>> A.dothis
>>
>> whereas I'm expecting B.dothis.
>>
>> I using Flash Professional v 8.0.
>>
>> Has anyone seem this problem before?
>>
>>
>> Chris
>> --
>> Chris Velevitch
>> Manager - Sydney Flash Platform Developers Group
>> www.flashdev.org.au
>> _______________________________________________
>> Flashcoders mailing list
>> [email protected]
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
> --
> http://snafoo.org/
> jabber: [EMAIL PROTECTED]
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders