summaryrefslogtreecommitdiff
path: root/action.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-18 21:00:37 -0600
committerJeff Carr <[email protected]>2024-01-18 21:00:37 -0600
commit0adbbecdac066607842686da1c0db1530e7b1728 (patch)
treeb6f92f74b6d1605d073125211ff27e44429c60a8 /action.go
parent0fd60847fcb637643748a141dcb15768361578ca (diff)
better function names
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'action.go')
-rw-r--r--action.go30
1 files changed, 12 insertions, 18 deletions
diff --git a/action.go b/action.go
index 08dd212..83f0afc 100644
--- a/action.go
+++ b/action.go
@@ -205,8 +205,8 @@ func (n *node) Delete() {
}
}
-func rawAction(a *widget.Action) {
- log.Log(INFO, "rawAction() START a.ActionType =", a.ActionType, "a.Value", a.Value)
+func processAction(a *widget.Action) {
+ log.Log(INFO, "processAction() START a.ActionType =", a.ActionType, "a.Value", a.Value)
if a.ActionType == widget.ToolkitInit {
Init()
@@ -219,10 +219,10 @@ func rawAction(a *widget.Action) {
return
}
- log.Warn("andlabs rawAction() START a.WidgetId =", a.WidgetId, "a.ParentId =", a.ParentId, a.ActionType)
+ log.Warn("andlabs processAction() START a.WidgetId =", a.WidgetId, "a.ParentId =", a.ParentId, a.ActionType)
switch a.WidgetType {
case widget.Flag:
- log.Log(ERROR, "rawAction() RE-IMPLEMENT LOG FLAGS")
+ log.Log(ERROR, "processAction() RE-IMPLEMENT LOG FLAGS")
return
}
@@ -233,26 +233,20 @@ func rawAction(a *widget.Action) {
n := me.treeRoot.FindWidgetId(a.WidgetId)
if a.ActionType == widget.Add {
- me.treeRoot.ListWidgets()
- // ui.QueueMain(func() {
add(a)
- // })
- // TODO: remove this artificial delay
- // sleep(.001)
return
}
if a.ActionType == widget.Dump {
- log.Log(NOW, "rawAction() Dump =", a.ActionType, a.WidgetType, n.State.ProgName)
- // me.rootNode.listChildren(true)
+ log.Log(NOW, "processAction() Dump =", a.ActionType, a.WidgetType, n.State.ProgName)
return
}
if n == nil {
- log.Error(errors.New("andlabs rawAction() ERROR findWidgetId found nil"), a.ActionType, a.WidgetType)
- log.Log(NOW, "rawAction() ERROR findWidgetId found nil for id =", a.WidgetId)
- log.Log(NOW, "rawAction() ERROR findWidgetId found nil", a.ActionType, a.WidgetType)
- log.Log(NOW, "rawAction() ERROR findWidgetId found nil for id =", a.WidgetId)
+ log.Error(errors.New("andlabs processAction() ERROR findWidgetId found nil"), a.ActionType, a.WidgetType)
+ log.Log(NOW, "processAction() ERROR findWidgetId found nil for id =", a.WidgetId)
+ log.Log(NOW, "processAction() ERROR findWidgetId found nil", a.ActionType, a.WidgetType)
+ log.Log(NOW, "processAction() ERROR findWidgetId found nil for id =", a.WidgetId)
me.treeRoot.ListWidgets()
return
panic("findWidgetId found nil for id = " + string(a.WidgetId))
@@ -301,10 +295,10 @@ func rawAction(a *widget.Action) {
case widget.Delete:
n.Delete()
case widget.Move:
- log.Log(NOW, "rawAction() attempt to move() =", a.ActionType, a.WidgetType)
+ log.Log(NOW, "processAction() attempt to move() =", a.ActionType, a.WidgetType)
*/
default:
- log.Log(ERROR, "rawAction() Unknown =", a.ActionType, a.WidgetType)
+ log.Log(ERROR, "processAction() Unknown =", a.ActionType, a.WidgetType)
}
- log.Log(INFO, "rawAction() END =", a.ActionType, a.WidgetType)
+ log.Log(INFO, "processAction() END =", a.ActionType, a.WidgetType)
}