Multiple onChnage events for HaxeUI Slider

I have a HaxeUI slider in tab no. 2 of a TabView with 2 tabs.
Pos of the slider is set via code. If I run and select the Tab 2 (the one with the slider), 3 onChange events for the Slider get dispatched, but only first time is slect the tabe. Showing the slider the first time will cause the multiple change events.
How can I stop this?
How can I detect real slider changes made by the user?

Hi,

Ill try to recreate from your description later, but generally its a little nicer to have a minimal test app to play with that shows the issue. It just means that I (or anyone) doesnt have to guess at what your seeing / doing.

Cheers,

PS: there is a dedicated haxeui forum here: https://community.haxeui.org/ (just an FYI as i dont check the openfl forums as often as I do that one)

Here is a sample: https://www.file.io/download/8IJryspu9A48

HaxeUI with openfl backend.

Sorry https://file.io/U1nM1agbnY0y

1 Like

Should be fixed in latest git version of haxeui-core:

change_count

You can use git version using:

haxelib git haxeui-core https://github.com/haxeui/haxeui-core

Note that generally if you are using git version of haxeui-core you should use the git version of the backend (haxeui-openfl in your case):

haxelib git haxeui-openfl https://github.com/haxeui/haxeui-openfl

Currently, it may not make that much of a difference since v1.3 was released so recently, but its probably good to make sure they match

Cheers,
Ian

Not fixed with latest GIT versions.
Also see a new project with similar a problem: https://file.io/IL5NGzPHKZuf

I setup the DropDown at runtime. A single “onChange” event gets fired for the DropDown if I select Tab 2 and the DropDown gets visible the first time.
But there is no “onChange” event if I set selectedIndex at runtime. Ok, this might be because of visibility of Dropdown at the time when I set selectedIndex
But how do I react on a real user item selection? There is just onChange for this. But in my special case it is not really a user interaction and causes troubles if you do critical things in the onChnage handler, like saving to a web server.

Found a solution by checking onReady in my onChange handler, and skip any further event handling if DropDown is no ready.

But not sure, if it wouldn’t be better if HaxeUI does not fire the event while the component is not ready.

Can you upload the file again? I think it expired (sorry for the lateness :slight_smile: )