[mtasc] Class priority (MMC vs MTASC)

Michael Hansen borendex at gmail.com
Wed Sep 21 13:52:57 CEST 2005


I've also spent some time tracking down strange behaviour which was due to 
the way namespaces was resolved. Hopefully -someday- MTASC will detect such 
ambiguities and refuse to compile or at least print warnings. 

Being on a dealine at that time I just appended full class paths for classes 
of concern.

Cheers

-michael


On 9/21/05, Rostislav Hristov <rostislav.hristov at gmail.com> wrote:
> 
> Hi Robert,
> 
> thanks for the info, but this is not the exact problem. Anyway, I
> tried it and it does not change the situation. I'm also looking for a
> default behaviour of the compiler since I don't explicitly specify the
> std/std8 folders when they're placed next to the MTASC executable.
> 
> Here is what I get using MTASC:
> 
> case 1:
> import com.asual.enflash.ui.Button;
> var b = new Button(); // b is my custom Button
> 
> case 2:
> import com.asual.enflash.ui.*;
> var b = new Button(); // b is not my custom Button
> 
> With MMC:
> 
> case 1:
> import com.asual.enflash.ui.Button;
> var b = new Button(); // b is my custom Button
> 
> case 2:
> import com.asual.enflash.ui.*;
> var b = new Button(); // b is my custom Button
> 
> case 3:
> var b = new Button(); // b is not my custom Button
> 
> 
> -Rostislav
> 
> 
> 
> On 9/21/05, Robert Penner <info at robertpenner.com> wrote:
> > For both compilers, the classpath order is completely customizable. Set 
> them
> > up with the same order and you shouldn't see any difference. MMC defines 
> the
> > classpaths with the AS 2.0 preferences, MTASC with cp.
> >
> > Robert
> >
> > -----Original Message-----
> > From: mtasc-bounces at lists.motion-twin.com
> > [mailto:mtasc-bounces at lists.motion-twin.com]On Behalf Of Rostislav
> > Hristov
> > Sent: Tuesday, September 20, 2005 10:13 AM
> > To: MotionTwin ActionScript2 Compiler List
> > Subject: [mtasc] Class priority (MMC vs MTASC)
> >
> >
> > Hi,
> >
> > this issue happens when you import all the classes of a package using
> > an asterisk. If there is a concurrence between the name of a custom
> > class and a Flash's build-in class, the second one prevails in MTASC.
> > On the other side in MMC the custom class prevails and saves you from
> > writing tons of include statements every time such a case exist.
> >
> > <code>
> >
> > import com.asual.enflash.ui.*;
> >
> > /*
> > You will need these includes in order to instantiate the custom Button
> > class using MTASC.
> > import com.asual.enflash.ui.Label;
> > import com.asual.enflash.ui.Button;
> > */
> >
> > class Demo {
> >
> > public function Demo():Void {
> > var lbl = new Label();
> > var btn = new Button();
> > }
> >
> > public static function main():Void {
> > var demo = new Demo();
> > }
> >
> > }
> >
> > </code>
> >
> >
> > I hope there is a solution for this difference.
> >
> > Thanks,
> > Rostislav
> >
> >
> > --
> > EnFlash - It's all about features...
> > http://www.asual.com/enflash/
> > --
> > MTASC : no more coffee break while compiling
> >
> >
> 
> 
> --
> EnFlash - It's all about features...
> http://www.asual.com/enflash/
> --
> MTASC : no more coffee break while compiling
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/mtasc/attachments/20050921/33377aa3/attachment-0003.htm


More information about the mtasc mailing list