diff options
| author | Jeff Carr <[email protected]> | 2024-01-19 12:08:21 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-19 12:08:21 -0600 |
| commit | 530fbcc1298bd65329bdb5d2d8f84aef8122f30f (patch) | |
| tree | ee648c243845340400b5e1594ee926b9767c0169 /init.go | |
| parent | 179dd22fe03618d7b859dab17042c70e4098490d (diff) | |
cleaner namesv0.0.5
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'init.go')
| -rw-r--r-- | init.go | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -10,19 +10,11 @@ import ( var muAction sync.Mutex -func (me *TreeInfo) toolkit(a widget.Action) { - if me.ActionFromChannel == nil { - log.Error(errors.New("toolkit ActionFromChannel == nil"), a.WidgetId, a.ActionType, a.WidgetType) - return - } - me.ActionFromChannel(a) -} - func (me *TreeInfo) catchActionChannel() { defer func() { if r := recover(); r != nil { log.Warn(me.PluginName, "tree YAHOOOO Recovered in simpleStdin()", r) - me.DoToolkitPanic() + me.SendToolkitPanic() panic(-1) } }() @@ -43,7 +35,11 @@ func (me *TreeInfo) catchActionChannel() { */ muAction.Lock() // send this to the toolkit - me.toolkit(a) + if me.ActionFromChannel == nil { + log.Error(errors.New("toolkit ActionFromChannel == nil"), a.WidgetId, a.ActionType, a.WidgetType) + } else { + me.ActionFromChannel(a) + } muAction.Unlock() // log.Info("catchActionChannel() STUFF END", a.WidgetId, a.ActionType, a.WidgetType) } |
