diff --git a/dialog.go b/dialog.go index 9e215a9..1b4391a 100644 --- a/dialog.go +++ b/dialog.go @@ -77,7 +77,7 @@ func CreateConfirmationDialog(title, question string, buttons []string, defaultB closeFunc := dlg.onClose WindowManager().EndUpdate() if closeFunc != nil { - go closeFunc() + closeFunc() } }) var btn2, btn3 *Button @@ -89,7 +89,7 @@ func CreateConfirmationDialog(title, question string, buttons []string, defaultB dlg.result = DialogButton2 WindowManager().DestroyWindow(dlg.view) if dlg.onClose != nil { - go dlg.onClose() + dlg.onClose() } }) } @@ -100,7 +100,7 @@ func CreateConfirmationDialog(title, question string, buttons []string, defaultB dlg.result = DialogButton3 WindowManager().DestroyWindow(dlg.view) if dlg.onClose != nil { - go dlg.onClose() + dlg.onClose() } }) } @@ -122,7 +122,7 @@ func CreateConfirmationDialog(title, question string, buttons []string, defaultB WindowManager().DestroyWindow(dlg.view) } if dlg.onClose != nil { - go dlg.onClose() + dlg.onClose() } } return true @@ -212,7 +212,7 @@ func CreateSelectDialog(title string, items []string, selectedItem int, typ Sele } WindowManager().DestroyWindow(dlg.view) if dlg.onClose != nil { - go dlg.onClose() + dlg.onClose() } }) @@ -223,7 +223,7 @@ func CreateSelectDialog(title string, items []string, selectedItem int, typ Sele dlg.value = -1 WindowManager().DestroyWindow(dlg.view) if dlg.onClose != nil { - go dlg.onClose() + dlg.onClose() } }) ActivateControl(dlg.view, btn2) @@ -236,7 +236,7 @@ func CreateSelectDialog(title string, items []string, selectedItem int, typ Sele WindowManager().DestroyWindow(dlg.view) } if dlg.onClose != nil { - go dlg.onClose() + dlg.onClose() } } diff --git a/edit.go b/edit.go index adfee21..06746d7 100644 --- a/edit.go +++ b/edit.go @@ -25,7 +25,7 @@ func (e *EditField) SetTitle(title string) { e.title = title if e.onChange != nil { ev := Event{Msg: title} - go e.onChange(ev) + e.onChange(ev) } } } diff --git a/listbox.go b/listbox.go index b205a60..03d36e9 100644 --- a/listbox.go +++ b/listbox.go @@ -258,7 +258,7 @@ func (l *ListBox) processMouseClick(ev Event) bool { WindowManager().EndUpdate() if onSelFunc != nil { ev := Event{Y: l.topLine + dy, Msg: l.SelectedItemText()} - go onSelFunc(ev) + onSelFunc(ev) } return true @@ -316,7 +316,7 @@ func (l *ListBox) ProcessEvent(event Event) bool { case term.KeyCtrlM: if l.currSelection != -1 && l.onSelectItem != nil { ev := Event{Y: l.currSelection, Msg: l.SelectedItemText()} - go l.onSelectItem(ev) + l.onSelectItem(ev) } default: return false