[mtasc] beta4 & linux

erixtekila erixtekila at ifrance.com
Fri Nov 12 19:16:32 CET 2004


That does help, thanx for the trick.

> it won't be called automatically. you still need to call it yourself
> somehow, e.g. by setting a static var to its return value. neither
> does the class have to be called Main, nor does it have to have a
> 'run' method. it's just a construct to trick the compiler into calling
> a method by assigning its return value to a var.
>
> like this:
>
> class MyMainClass (
>    static function myEntryPoint ():Boolean {
>       /* init... */
>       return true;   // return something
>    }
>    // now, set a var to the return value of the init method,
>    // so it gets called
>    static var foo:Boolean = MyMainClass.myEntryPoint();
> }
>

Perhaps should it be reported in the "FAQ" ?

cheers.




More information about the mtasc mailing list