diff options
Diffstat (limited to 'toolkit/andlabs/common.go')
| -rw-r--r-- | toolkit/andlabs/common.go | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/toolkit/andlabs/common.go b/toolkit/andlabs/common.go index 5e1b0fb..cddea3e 100644 --- a/toolkit/andlabs/common.go +++ b/toolkit/andlabs/common.go @@ -5,13 +5,17 @@ import ( ) func (t *andlabsT) commonChange(tw *toolkit.Widget, wId int) { - log(debugChange, "commonChange() START widget =", t.tw.Name, t.tw.Type) + log(debugChange, "commonChange() START widget =", t.Name, t.WidgetType) + if (sendToChan(wId)) { + log(debugChange, "commonChange() END attempted channel worked", t.Name, t.WidgetType) + return + } if (tw == nil) { log(true, "commonChange() What the fuck. there is no widget t.tw == nil") return } if (tw.Custom == nil) { - log(debugChange, "commonChange() END Widget.Custom() = nil", t.tw.Name, t.tw.Type) + log(debugChange, "commonChange() END Widget.Custom() = nil", t.Name, t.WidgetType) return } tw.Custom() @@ -20,16 +24,15 @@ func (t *andlabsT) commonChange(tw *toolkit.Widget, wId int) { log(debugError, "commonChange() ERROR: wId map == nil", wId) return } - sendToChan(wId) - log(debugChange, "commonChange() END Widget.Custom()", t.tw.Name, t.tw.Type) + log(debugChange, "commonChange() END Widget.Custom()", t.Name, t.WidgetType) } -func sendToChan(i int) { +func sendToChan(i int) bool { if (callback == nil) { log(debugError, "commonChange() SHOULD SEND int back here, but callback == nil", i) - return + return false } log(debugError, "commonChange() Running callback() i =", i) - callback(i) + return callback(i) } |
