[mtasc] Decorators question (possible reason why MX V2
Componentsdoesn't compiled properly with MTASC)
Nicolas Cannasse
ncannasse at motion-twin.com
Mon Mar 14 13:42:35 CET 2005
> I've just performed one more test
>
> private static var blnDecorated: Boolean = CDecorator.decorate(CClass);
>
> public CClass (Void)
> {
> trace(blnDecorated); // returns undefined in some cases
> }
>
> It means that in some cases CClass.blnDecorated initialization performs
> before CDecorator.decorate becomes initialized. But in such cases it
> seems it doesn't correct. Methods of all classes must be initialized at
> first and only then - all static properties.
This is not possible to happen with such a constructor.
Since CDecorator is referenced from within a class static variable
initialization, you can be sure that MTASC will generate CDecorator before
your class. Please check again your problem with several classes and report
more informations about it.
Nicolas
More information about the mtasc
mailing list