diff options
| author | Jeff Carr <[email protected]> | 2023-04-23 09:47:54 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-23 09:47:54 -0500 |
| commit | 1322a011e7f5b8665b671d4c5ee4e65804ca75be (patch) | |
| tree | 24ed995ace7694128d5ecdb4ebafc5da7cd868e3 /toolkit/andlabs/main.go | |
| parent | 2d4d2b6b3e115a86a10f98c20de0e4e82be519c2 (diff) | |
andlabs: ran without crashing
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/main.go')
| -rw-r--r-- | toolkit/andlabs/main.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/toolkit/andlabs/main.go b/toolkit/andlabs/main.go index 5a99421..e9ac6b1 100644 --- a/toolkit/andlabs/main.go +++ b/toolkit/andlabs/main.go @@ -24,9 +24,6 @@ func catchActionChannel() { log(logNow, "catchActionChannel() START") for { log(logNow, "catchActionChannel() for loop") - uiMain.Do(func() { - go ui.Main(demoUI) - }) select { case a := <-pluginChan: log(logNow, "catchActionChannel() SELECT widget id =", a.WidgetId, a.Name) @@ -95,7 +92,7 @@ func queue(f func()) { } // This is important. This sets the defaults for the gui. Without this, there isn't correct padding, etc -func Init() { +func init() { log(logNow, "Init() START") log(debugToolkit, "Init()") // Can you pass values to a plugin init() ? Otherwise, there is no way to safely print @@ -106,7 +103,17 @@ func Init() { pluginChan = make(chan toolkit.Action, 1) log(logNow, "Init() start channel reciever") + go ui.Main(func() { + demoUI() + }) go catchActionChannel() + /* + // go catchActionChannel() + go uiMain.Do(func() { + ui.Main(demoUI) + // go catchActionChannel() + }) + */ log(logNow, "Init() END") } |
