ApplicationMain.hx : Error with DocumentClass [Solved]

Hello !

I’ve encounter some issue when I try to compile my application for Cpp.
I’ve change nothing on my code except a comment and I’ve got this error when I compile

Export/windows/cpp/haxe/ApplicationMain.hx:211: characters 5-13 : Not enough arguments
Export/windows/cpp/haxe/ApplicationMain.hx:184: characters 7-42 : Defined in this class
Export/windows/cpp/haxe/ApplicationMain.hx:183: characters 2-7 : Missing super constructor call
Export/windows/cpp/haxe/ApplicationMain.hx:184: characters 7-42 : Defined in this class

It’s located on the creation of DocumentClass class on ApplicationMain.hx, and I’ve sincerely no idea for how to solve that.

Can you bring me some help ?

Thanks for reading, Chloro.

Edit : The solution is that my constructor, function new, have parameter, so it’s why it didn’t work.

Did you accidentally comment out super(); anywhere in your classes?

1 Like

No, the super(); still there. :confused:

But I do something particular, but before the commenting of some line on my code it work, and now when I remove it doesn’t work …

class Main extends Stage {

    public static function main() {
        Lib.application.addModule(new Main(500,500,0x545454));

    public function new(width:Int, height:Int, color:Null<Int> = null) {


There is my code, except some override and other things, but that worked before and doesn’t work now, even if I remove all the override that I’ve put.

I’ve on the idea to replace the Event system to make my own, for my handmade framework, and in a first time I’ve think to go where the event where call. It’s on an idea to keep the update of lime, and in this way separate truly the update and the draw. :wink:

Does your main class constructor require any arguments?

EDIT: it does, so the template doesn’t know how to create it, you’ll have to remove them I guess

1 Like

It was that, I doesn’t know that thing ! It compile now, thanks you ! :smiley:

Now, I’m asking myself why it works before, if it was that …