haxeui / haxeui-core

The core library of the HaxeUI framework
http://haxeui.org
MIT License
346 stars 72 forks source link

Extending DropDown component hangs Haxe 3 builds (openfl) #288

Closed AlexHaxe closed 5 years ago

AlexHaxe commented 5 years ago

Haxe 3 builds hang indefinitely when using a custom DropDown component. It doesn't seemt to matter which target (tried linux, neko and html5). It's probably not limited to DropDown components and might not even be limited to openfl backend. Haxe 4 seems unaffected.

Expected Behavior

speedy compilation

Current Behavior

hangs Haxe 3 compiler

Steps to Reproduce (for bugs)

compile with Haxe 3

import haxe.ui.Toolkit;
import haxe.ui.components.DropDown;
import openfl.display.Sprite;

class Main extends Sprite {
    public function new() {
        super();
        Toolkit.init();
        addChild(new MyDropDown());
    }
}

class MyDropDown extends DropDown {
    public function new() {
        super();
    }
}
<?xml version="1.0" encoding="utf-8"?>
<project>
    <meta title="MyApp" package="" version="1.0.0" company="" />
    <app main="Main" path="out" file="Main" />
    <source path="src" />
    <haxelib name="openfl" />
    <haxelib name="haxeui-core" />
    <haxelib name="haxeui-openfl" />
</project>

Context

In previous master listview portion of DropDown would open somewhat offset, so I used a custom child class to correct x and y. The offset is probably caused by me for placing a haxeui form inside a Sprite that isn't located at 0x0 / top left corner of app.

Your Environment

tested with Haxe 3.4.7 on Ubuntu 18.04 Openfl 8.9.1 Lime 7.5.0 haxeui-core git haxeui-openfl git

AlexHaxe commented 5 years ago

After some more testing it seems like it might be enough to just use Haxe 3 without any subclassing.

ianharrigan commented 5 years ago

So this should be fixed now... its a bit of a work around for haxe 3 and using the "@:xml" meta data causing issues. Ill come back to it at some point, but for now, can you retest this and let me know if it builds for you?

Cheers, Ian

AlexHaxe commented 5 years ago

Your fix works, with latest git versions of haxeui-core and haxeui-openfl I can compile without compiler hangs.