diff options
| author | Jeff Carr <[email protected]> | 2023-04-27 12:41:42 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-27 12:41:42 -0500 |
| commit | 253dcb012f6d4fc861e6fc9a66fd2c7260ead442 (patch) | |
| tree | a3092695fa5d6769d5898e3319016f0bb84ae6e9 /toolkit/andlabs/common.go | |
| parent | 8100e7a1abdc31afbf65af6d0b7cd7cb0fff69eb (diff) | |
andlabs: deprecate old code
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/common.go')
| -rw-r--r-- | toolkit/andlabs/common.go | 21 |
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 |
