lxn / walk

A Windows GUI toolkit for the Go Programming Language
Other
6.78k stars 885 forks source link

ComboBox doesn't trigger `OnCurrentIndexChanged` handler, when receiving: `win.CBN_SELCHANGE` #736

Closed shivas closed 3 years ago

shivas commented 3 years ago

This bug haunted for me for few hours thinking i'm doing something wrong. But looks like one-liner was missing.

PR with fix #735

lxn commented 3 years ago

Could you please provide a short repro that demonstrates the problem? It seems to me everything is working as expected.

shivas commented 3 years ago

@lxn there u go https://gist.github.com/shivas/59ad912e4c8a1150523096b9fa14fbcd

shivas commented 3 years ago

Btw, even though reproducible code doesn't have that, i noticed that if any other data-bound component value changed, it would save updated-actual combobox value. That gave me hint that there could be issue with event firing.

shivas commented 3 years ago

Then while debugging I found that message loop received this event: https://docs.microsoft.com/en-us/windows/win32/controls/cbn-selchange

shivas commented 3 years ago

@lxn any news about this? have you managed to reproduce it?

lxn commented 3 years ago

Yes, thanks for the repro code and PR. No idea how I managed to forget adding that.

shivas commented 3 years ago

@lxn thanks, name added