summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/andlabs/common.go')
-rw-r--r--toolkit/andlabs/common.go21
1 files changed, 8 insertions, 13 deletions
diff --git a/toolkit/andlabs/common.go b/toolkit/andlabs/common.go
index 630c6a9..c8ecae1 100644
--- a/toolkit/andlabs/common.go
+++ b/toolkit/andlabs/common.go
@@ -56,26 +56,21 @@ func addWidget(a *toolkit.Action, tk *andlabsT) *node {
if n.parent != nil {
n.parent.children = append(n.parent.children, n)
}
-
- // deprecate this when this toolkit uses the binary tree instead
- if (andlabs[a.WidgetId] == nil) {
- andlabs[a.WidgetId] = tk
- }
-
return n
}
-func (t *andlabsT) doUserEvent() {
+func (n *node) doUserEvent() {
if (callback == nil) {
- log(debugError, "doUserEvent() callback == nil", t.wId)
+ log(debugError, "doUserEvent() callback == nil", n.WidgetId)
return
}
var a toolkit.Action
- a.WidgetId = t.wId
- a.Name = t.Name
- a.S = t.s
- a.I = t.i
- a.B = t.b
+ a.WidgetId = n.WidgetId
+ a.Name = n.Name
+ a.Text = n.Text
+ a.S = n.S
+ a.I = n.I
+ a.B = n.B
a.ActionType = toolkit.User
log(logInfo, "doUserEvent() START: send a user event to the callback channel")
callback <- a