using WaitOK() to debug gocui & andlabs init()

This commit is contained in:
Jeff Carr 2025-02-13 14:14:39 -06:00
parent 827a258a86
commit dcfa5d03ee
1 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ func (me *TreeInfo) InitOK() {
// this hack is to wait for the application to send something // this hack is to wait for the application to send something
// before trying to do anything. todo: rethink this someday // before trying to do anything. todo: rethink this someday
func (me *TreeInfo) waitOK() { func (me *TreeInfo) WaitOK() {
for { for {
if me.ok { if me.ok {
return return
@ -66,6 +66,6 @@ func (me *TreeInfo) Callback(guiCallback chan widget.Action) {
// this is the function that receives things from the application // this is the function that receives things from the application
func (me *TreeInfo) PluginChannel() chan widget.Action { func (me *TreeInfo) PluginChannel() chan widget.Action {
me.waitOK() me.WaitOK()
return me.pluginChan return me.pluginChan
} }