I have a dialog with both close_cb and show_cb defined. Environment is Windows 10, Lua 5.1, IUP 3.11.2 (I can’t upgrade).
When the Dialog is closed using the Close Window X, the sequence of events is: close_cb show_cb (with state = 4) The last line dlg:destroy() is never executed so it appears the dialog is not destroyed although it is no longer visible. Removing the show_cb callback allows close_cb to work as it should. What am I doing wrong? ==========Sample code below ================== require( "iuplua" ) vbox = iup.vbox { iup.label {title="Label"}, iup.button { title="Test" } } dlg = iup.dialog{vbox; title="Dialog"} dlg.show_cb = function(self, state) if state == iup.SHOW then print(state) –content of the function is callback to the bug; it just has to exist end end dlg.close_cb = function() return iup.CLOSE end dlg:show() if (iup.MainLoopLevel()==0) then iup.MainLoop() end dlg:destroy()
_______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users