Open jdxj opened 5 years ago
... expandBtn.OnClicked(func(button ui.Button) { go output2() }) ... func output2() { err := ui.Main(func() { win := ui.NewWindow("lllll", 200, 100, false) win.OnClosing(func(window ui.Window) bool { return true }) win.Show() }) if err != nil { panic(err) } }
You can't call ui.Main
more than once; you wanted ui.QueueMain
in output2
.
When I start two windows with one button, if I close the first window, then all ui are exited.
(___TestFirst_in_mytst_client_player_ui:28734): CRITICAL : 16:36:09.819: [libui] /home/travis/build/andlabs/libui/unix/alloc.c:83:uiprivFree() POSSIBLE IMPLEMENTATION BUG; CONTACT ANDLABS: 0x7fc4b80f7d70 not found in allocations array in uiprivFree() SIGTRAP: trace trap PC=0x7b3e03 m=3 sigcode=128 signal arrived during cgo execution