From 253dcb012f6d4fc861e6fc9a66fd2c7260ead442 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 27 Apr 2023 12:41:42 -0500 Subject: andlabs: deprecate old code Signed-off-by: Jeff Carr --- toolkit/andlabs/common.go | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'toolkit/andlabs/common.go') 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 -- cgit v1.2.3