summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/common.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-03 10:26:47 -0500
committerJeff Carr <[email protected]>2023-04-03 10:26:47 -0500
commit4b6207743b90968d6b822032a4355e43b6ce6da9 (patch)
tree2cb9f13d5e95f14e165f8e41e8484320b7454177 /toolkit/andlabs/common.go
parent0320ebe4bb49ea80761d77af80fa208157ffdb89 (diff)
gocui: working towards correct layout
make a gocui widget binary tree more debugging cleanups sample button app displays in gocui geometry logic closer to correct improvements in gocui layout continued attempts to clean up tabs dump binary tree moving towards proper chan callback() deprecate Widget.Name Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/common.go')
-rw-r--r--toolkit/andlabs/common.go17
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)
}