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/plugin.go | |
| parent | 2d4d2b6b3e115a86a10f98c20de0e4e82be519c2 (diff) | |
andlabs: ran without crashing
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/plugin.go')
| -rw-r--r-- | toolkit/andlabs/plugin.go | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/toolkit/andlabs/plugin.go b/toolkit/andlabs/plugin.go index f9befd5..a7205fb 100644 --- a/toolkit/andlabs/plugin.go +++ b/toolkit/andlabs/plugin.go @@ -24,6 +24,7 @@ func Send(p *toolkit.Widget, c *toolkit.Widget) { } */ +/* func oldAction2(a *toolkit.Action) { log(logNow, "Action() START") if (a == nil) { @@ -31,22 +32,31 @@ func oldAction2(a *toolkit.Action) { return } pluginChan <- *a - /* + f := func() { rawAction(a) } // f() Queue(f) - */ log(logNow, "Action() END") } - +*/ func rawAction(a toolkit.Action) { log(debugAction, "rawAction() START a.ActionType =", a.ActionType) log(debugAction, "rawAction() START a.S =", a.S) + if (a.ActionType == toolkit.InitToolkit) { + // TODO: make sure to only do this once + // go uiMain.Do(func() { + // ui.Main(demoUI) + // go catchActionChannel() + // }) + // try doing this on toolkit load in init() + return + } + log(logNow, "rawAction() START a.WidgetId =", a.WidgetId, "a.ParentId =", a.ParentId) switch a.WidgetType { case toolkit.Flag: |
