StablexUI
StablexUI copied to clipboard
on-display is not working with html5
In html5, at defaults.xml
I've noticed that on-display is not working, however, on-change working fine:
on-display="PropsBinder.setCurrentField($this);"
on-create="$this.addEventListener(WidgetEvent.CHANGE, PropsBinder.OnPropertyChange);"
It seems that openfl.events.Event.ADDED_TO_STAGE
is not working on html5?
I also tried:
on-create="$this.addEventListener(openfl.events.Event.ADDED_TO_STAGE, PropsBinder.setCurrentField); $this.addEventListener(WidgetEvent.CHANGE, PropsBinder.OnPropertyChange);"
but didn't work..
versions:
lime: [3.3.0]
openfl: [4.2.0]
stablexui: [1.1.5]
$ haxe -version
3.3.0
it seems it's related to openfl?
I've created a sample project in openfl, with html5 target, event ADDED_TO_STAGE
worked fine, so, it seems a bug in StablexUI ?
I've tried this simple gui:
<Text text="'Hello'" on-display="
trace('DISPLAY!!!');
var g = flash.Lib.current.graphics;
g.beginFill(0xFF0000);
g.drawRect(0, 0, 100, 100);
g.endFill();
"/>
And got red square and string in console. So for me it looks like on-display
is working.
I've tested with the same libs versions and both Haxe 3.2 and 3.3 (latest git)
Can you assemble a minimal project for me to reproduce this issue?
Also make sure you are not clearing attached listeners somewhere with widget.clearEvent(type)
Oh, wait. I tested with latest StablexUI from git. Everything else had the same versions.