Haxeui onReady function

People using HaxeUI, I hope you can help me on this :

I’m not able to get onReady event fired on Controller while targeting windows.
Looking at Controller.hx class we have this code:

	_view.addEventListener(UIEvent.ADDED_TO_STAGE, function(e) {
		if (_view.width != 0 && _view.height != 0) {

It seems that the _view size of my controller is 0.
How can I avoid this issue and get onRedy fired?

Thank for your help.

@IanHarrigan1982 Do you know what might be causing this?

It seems that it happens when we reuse the Root instance. I made a sample project to show the issue :

Sorry for the late reply, so i think ive fixed it as detailed in the GH issue: https://github.com/ianharrigan/haxeui/issues/357

Hope it helps. Im not 100% sure that the controller should be waiting for non-zero sizes to start with if im honest, but because im not sure what other code is out there expecting it to be non-zero size when ready is called ive erred on the side of caution.


From my side it fixes the issue. Thank you :slight_smile: