diff options
| author | Jeff Carr <[email protected]> | 2023-04-08 14:31:00 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-08 14:31:00 -0500 |
| commit | 0e0787c0620c0dca59378d1e3b355c60a1a82de1 (patch) | |
| tree | c376e21df8cb3a1e8d9cb6de0edc0aa8635263d9 /toolkit/gocui/main.go | |
| parent | 65148155a12151fdeb2ffebf03da2c3b836780a8 (diff) | |
gocui: smarter debugging
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/main.go')
| -rw-r--r-- | toolkit/gocui/main.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/toolkit/gocui/main.go b/toolkit/gocui/main.go index ed9670a..e2ec85f 100644 --- a/toolkit/gocui/main.go +++ b/toolkit/gocui/main.go @@ -9,6 +9,8 @@ import ( "git.wit.org/wit/gui/toolkit" ) +// sets defaults and establishes communication +// to this toolkit from the wit/gui golang package func Init() { log(logInfo, "Init() of awesome-gocui") me.defaultWidth = 10 @@ -43,20 +45,19 @@ func PluginChannel() chan toolkit.Action { } func catchActionChannel() { - log(logNow, "makeCallback() START") + log(logInfo, "catchActionChannel() START") for { - log(logNow, "makeCallback() for loop") + log(logInfo, "catchActionChannel() infinite for() loop restarted select on channel") select { case a := <-me.pluginChan: - log(logNow, "makeCallback() SELECT widget id =", a.WidgetId, a.Name) + log(logNow, "catchActionChannel()", a.WidgetId, a.ActionType, a.WidgetType, a.Name) action(&a) - sleep(.1) } } } func Exit() { - // TODO: send exit to the plugin + // TODO: what should actually happen here? me.baseGui.Close() } |
