jk3064 / chiliui

a lua-based opengl GUI
GNU General Public License v2.0
15 stars 9 forks source link

combobox selection sometimes doesn't work #14

Closed gajop closed 10 years ago

gajop commented 11 years ago

Selection sometimes doesn't work in combobox because FocusUpdate gets triggered: https://github.com/jk3064/chiliui/blob/master/chili/controls/combobox.lua#L53, which closes the DropDownWindow, and :Disposes() the controls in it.

This means that this https://github.com/jk3064/chiliui/blob/master/chili/controls/combobox.lua#L70 may not get called because it got :DIsposed().

It's not easy to reproduce, it doesn't happen 100% of time and I guess that's because of the GC. I've no idea how to fix it properly, I tried delaying the invocation of :_CloseWindow() in the next :Update() but it didn't work.

gajop commented 10 years ago

Can't reproduce this anymore, so closing.