[mtasc] super() not being called

Ralf Bokelberg info at bokelberg.de
Tue Aug 30 19:45:40 CEST 2005


I further analyzed the problem and
it seems like class B is initialized before class A.
That's why the prototype of class B is not connected to class A.
I'm not sure, if this can be changed easily, though.

Cheers,
Ralf.


Ralf Bokelberg wrote:

> OK, now i'm able to reproduce it.
> It seems like MTASC doesn't replace the original class B, when it is 
> compiled with MMC.
> 
> Steps:
> - Create a class "B" and use it in the swf.
> - Put a log in the constructor
> - Create the swf using MMC, running the swf should log within the 
> constructor
> - create a class "A" and also put a log in the constructor
> - let "B" extend "A" and call super in the constructor
> - compile with MTASC
> 
> Expected:
> - running the swf should call/log both constructors
> 
> Actual:
> - only the B constructor is called/logged
> 
> 
> Thanks for the report,
> Ralf.
> 
> 
> 
> Ralf Bokelberg wrote:
> 
>> Seems to works fine.
>> I wonder how you create the first swf? MMC?
>>
>> Cheers,
>> Ralf
>>
>> Sönke Rohde wrote:
>>
>>> Hi Ralf,
>>> This is very simple to reproduce.
>>> - Create a class "B" and use it in the swf.
>>> - Put a log in the constructor
>>> - running the swf should log within the constructor
>>> - create a class "A" and also put a log in the constructor
>>> - let "B" extend "A" and call super in the constructor
>>> - compile with MTASC
>>> - running the swf should log both constructors but only the B 
>>> constructor is
>>> logged
>>>
>>> var foo:B = new B();
>>> var b:Boolean = foo instanceof A; // will return false
>>>
>>> - rename "B" to "C" and compile again and also the A constructor log 
>>> will
>>> appear and instanceof will return true.
>>>
>>> The problem can be reproduced with MTASC 1.09 and your HMTASC too.
>>>
>>> Cheers,
>>> Sönke
>>>
>>>
>>>> -----Ursprüngliche Nachricht-----
>>>> Von: mtasc-bounces at lists.motion-twin.com 
>>>> [mailto:mtasc-bounces at lists.motion-twin.com] Im Auftrag von Ralf 
>>>> Bokelberg
>>>> Gesendet: Montag, 29. August 2005 12:31
>>>> An: MotionTwin ActionScript2 Compiler List
>>>> Betreff: Re: [mtasc] super() not being called
>>>>
>>>> Mtasc does not cache anything on the filesystem.
>>>> It would be great, if you could provide some files to reproduce this 
>>>> problem
>>>>
>>>> Cheers,
>>>> Ralf
>>>>
>>>> Carlos Rovira wrote:
>>>>
>>>>> You're right Sonke, I only point the ASO issue because you 
>>>>
>>>>
>>>>
>>>> could have
>>>>
>>>>> problems with your original SWF compiled in the Flash IDE.
>>>>>
>>>>> 2005/8/29, Sönke Rohde <mail at soenkerohde.com>:
>>>>>
>>>>>
>>>>>> But does MTASC even use the ASO-files? I thought they where 
>>>>
>>>>
>>>>
>>>> only used by the
>>>>
>>>>>> MM IDE?
>>>>>>
>>>>>> Cheers,
>>>>>> Sönke
>>>>>>
>>>>>>
>>>>>>
>>>>>>> -----Ursprüngliche Nachricht-----
>>>>>>> Von: mtasc-bounces at lists.motion-twin.com
>>>>>>> [mailto:mtasc-bounces at lists.motion-twin.com] Im Auftrag von
>>>>>>> Carlos Rovira
>>>>>>> Gesendet: Montag, 29. August 2005 10:27
>>>>>>> An: MotionTwin ActionScript2 Compiler List
>>>>>>> Betreff: Re: [mtasc] super() not being called
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> there. Is
>>>>>>>> there some kind of cache somewhere else?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> maybe some ASO problem?
>>>>>>>
>>>>>>> try to delete ASO directory cache in mx/classes directory...I have
>>>>>>> some problems with that folder
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>>>> ::| Carlos Rovira
>>>>>>> ::| http://www.carlosrovira.com
>>>>>>> -- 
>>>>>>> MTASC : no more coffee break while compiling
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> MTASC : no more coffee break while compiling
>>>>>>
>>>>>
>>>>>
>>>>>
>>>> -- 
>>>> MTASC : no more coffee break while compiling
>>>>
>>>>
>>>
>>>
>>>
>>> -- 
>>> MTASC : no more coffee break while compiling
>>
>>
>> -- 
>> MTASC : no more coffee break while compiling
> 
> -- 
> MTASC : no more coffee break while compiling



More information about the mtasc mailing list