From 874e0beffad469f713d0435524e0a2f12dcfd978 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 11 Apr 2023 15:25:03 -0500 Subject: andlabs is broken Signed-off-by: Jeff Carr --- toolkit/gocui/main.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'toolkit/gocui') diff --git a/toolkit/gocui/main.go b/toolkit/gocui/main.go index f9611c1..de35700 100644 --- a/toolkit/gocui/main.go +++ b/toolkit/gocui/main.go @@ -33,6 +33,10 @@ func Init() { log(logNow, "Init() start pluginChan") go catchActionChannel() + sleep(.1) + go main() + // probably not needed, but in here for now under development + sleep(.1) } // this sets the channel to send user events back from the plugin @@ -50,14 +54,10 @@ func catchActionChannel() { log(logInfo, "catchActionChannel() infinite for() loop restarted select on channel") select { case a := <-me.pluginChan: - // this plugin can be loaded, but it doesn't actually do anything until - // the calling program sends an action to it. Then, it actually will initialize - // the tty and take over your console if (me.baseGui == nil) { - log(logError,"main() was not run yet") - go main() - // probably not needed, but in here for now under development - sleep(1) + // something went wrong initializing the gocui + log(logError,"ERROR: console did not initialize") + continue } log(logNow, "catchActionChannel()", a.WidgetId, a.ActionType, a.WidgetType, a.Name) action(&a) -- cgit v1.2.3