summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-05 09:13:55 -0600
committerJeff Carr <[email protected]>2024-02-05 09:13:55 -0600
commit0f178bfaed2962ad4b0e19c4590c346d4e68c5d4 (patch)
tree8f6715deb9afaeb93441e47814ca2a506b7963bd /init.go
parent8f937c19eeaeb116c53c74d07d71f245a0a68280 (diff)
action channel deprecated
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'init.go')
-rw-r--r--init.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/init.go b/init.go
index 67b5d18..f6951b0 100644
--- a/init.go
+++ b/init.go
@@ -10,6 +10,7 @@ import (
var muAction sync.Mutex
+// TODO: add checks for nil function pointers
func (me *TreeInfo) newAction(a widget.Action) {
n := me.treeRoot.FindWidgetId(a.WidgetId)
switch a.ActionType {
@@ -60,12 +61,12 @@ func (me *TreeInfo) catchActionChannel() {
case a := <-me.pluginChan:
log.Verbose("catchActionChannel() on ", a.WidgetId, a.WidgetType, a.ProgName)
muAction.Lock()
- if me.ActionFromChannel == nil {
- log.Error(errors.New("toolkit ActionFromChannel == nil"), a.WidgetId, a.ActionType, a.WidgetType)
+ if me.newAction == nil {
+ log.Error(errors.New("toolkit newAction == nil"), a.WidgetId, a.ActionType, a.WidgetType)
} else {
// send this to the toolkit
me.newAction(a)
- me.ActionFromChannel(a)
+ // me.ActionFromChannel(a)
}
muAction.Unlock()
}