diff options
| -rw-r--r-- | init.go | 7 | ||||
| -rw-r--r-- | structs.go | 2 |
2 files changed, 5 insertions, 4 deletions
@@ -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() } @@ -23,7 +23,7 @@ type TreeInfo struct { treeRoot *Node // NodeI interface{} - ActionFromChannel func(widget.Action) + // ActionFromChannel func(widget.Action) NodeAction func(*Node, widget.ActionType) Add func(*Node) AddText func(*Node, string) |
