haxeui / haxeui-openfl

The OpenFL backend of the HaxeUI framework -
http://haxeui.org
MIT License
42 stars 14 forks source link

haxeui-openfl broken for openfl v8 #24

Closed intoxopox closed 5 years ago

intoxopox commented 6 years ago

Can't build for neko, windows, or html targets once updated to OpenFL v8.0. Seems haxeui Component's invalidate is in conflict with OpenFL's invalidate method in DisplayObject.

Igazine commented 6 years ago

The problem is with DisplayObject.invalidate() which is a new function in OpenFL 8.0 but was previously defined in HaxeUI but obviously wasn't an override. So now the two has incompatible signature and parameters effectively making HaxeUI unusable in the new environment. Would be great if someone could come up with a solution

ianharrigan commented 6 years ago

from https://github.com/haxeui/haxeui-core/issues/223

Hmmm, is this openfl 8? Thats kinda annoying, i guess we could rename all "invalidate" functions to "invalidateComponent" :(

Its annoying and ill get round to it asap, but i have other work commitments at the moment - maybe in a day or so.

Igazine commented 6 years ago

Thank you for looking into it. Great support as always

ianharrigan commented 6 years ago

Ok, this should be fixed now. Can you retest and close if thats the case please?

Cheers, Ian

Igazine commented 6 years ago

I'm experiencing very weird issues with layout container alignments, many things look off, not where they were originally placed. That being said, I switched back to OpenFL 7.1.2 but kept the newest HaxeUI and suddenly everything compiles and works fine. There's something not OK with OpenFL 8, but that's another story. So far HaxeUI works and renders perfectly. OP should also post a follow up I think

Thank you for making the changes

intoxopox commented 6 years ago

I can build for all targets again, but have seen some buggy behavior with component size. I'll see if I can make a simple to test to isolate, as I can't tell if it's related to at all to this fix.

ianharrigan commented 6 years ago

Ok, an example would be great, openfl8 looks fine to me:

image

Button text / size i think is a few pixels off to be fair, but nothing major (unless that what you meant?)

FlashTang commented 6 years ago

no luck , openfl 8.1.1 not works
does haxeui-openfl works with starling-haxe ?

Called from ? line 1 Called from ApplicationMain.hx line 84 Called from ApplicationMain.hx line 116 Called from lime/app/Application.hx line 269 Called from lime/_backend/native/NativeApplication.hx line 160 Called from a C function Called from lime/_backend/native/NativeApplication.hx line 453 Called from lime/_macros/EventMacro.hx line 101 Called from openfl/display/Stage.hx line 330 Called from openfl/display/Stage.hx line 924 Called from openfl/display/Stage.hx line 1014 Called from openfl/display/Stage.hx line 1285 Called from openfl/display/Stage.hx line 1010 Called from openfl/display/DisplayObject.hx line 453 Called from a C function Called from openfl/events/EventDispatcher.hx line 217 Called from haxe/ui/backend/CallLaterBase.hx line 16 Called from haxe/ui/validation/ValidationManager.hx line 125 Called from haxe/ui/core/Component.hx line 1947 Called from haxe/ui/core/Component.hx line 1982 Called from haxe/ui/core/TextDisplay.hx line 235 Called from haxe/ui/core/TextDisplay.hx line 257 Called from haxe/ui/backend/TextDisplayBase.hx line 65 Called from /usr/local/lib/haxe/std/neko/_std/Std.hx line 39 Uncaught exception - std@math_floor

FlashTang commented 6 years ago

just crashs with blank openfl project (non-starling object) , the same error as above

FlashTang commented 6 years ago

never mind , My fault ! It works now , I just forget to use Toolkit.init();