@:require(flash11)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

@:require(flash11)

Jan_Flanders
It seems the @:require(flash11) is not being honoured.
http://code.google.com/p/haxe/source/browse/trunk/std/flash9/display/DisplayObjectContainer.hx#19

Eample:

build.hxml:
-main Main
-swf index.swf
-swf-version 9

Main.hx:
package;
import flash.display.MovieClip;
import flash.Lib;
class Main extends MovieClip
{
    public function new()
    {
        super();
    }
    /*
    Field removeChildren should be declared with 'override' since it is inherited from superclass
    Field removeChildren overload parent class with different or incomplete type
    String should be Void
    */
    public function removeChildren():String
    {
        return "hello";
    }
    public static function main()
    {
        Lib.current.addChild(new Main());
    }
}


It also breaks existing code like haxegui for example which had its own removeChildren method long before the Player API had one.

If it's considered a bug I'll copy it over the issue list on google code.

Jan



--
haXe - an open source web programming language
http://haxe.org