summaryrefslogtreecommitdiff
path: root/action.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-18 20:10:26 -0600
committerJeff Carr <[email protected]>2025-02-19 17:39:45 -0600
commit27c9417a32cb704537037aacc727e53ff933b5f3 (patch)
tree5d0445ca9a7b0b09ad91041acfd165d566b7132d /action.go
parentfd24d2ee0d5339080ef3b4096e1c69b5d12f2be1 (diff)
testing on tables
Diffstat (limited to 'action.go')
-rw-r--r--action.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/action.go b/action.go
index b097bfe..896e5d0 100644
--- a/action.go
+++ b/action.go
@@ -10,8 +10,39 @@ import (
"go.wit.com/widget"
)
+// repeated string order = 1;
+//
+// repeated StringRow StringRows = 2;
+// repeated IntRow IntRows = 3;
+// repeated TimeRow TimeRows = 4;
+// repeated BoolRow BoolRows = 5;
+func (me *TreeInfo) doTable(a widget.Action) {
+ if a.TablePB == nil {
+ log.Log(TREE, "tree: action didn't have a Table PB")
+ return
+ }
+ pb := guipb.NewTables()
+ if err := pb.Unmarshal(a.TablePB); err != nil {
+ log.Info("unmarshal error", err, "data len =", len(a.TablePB))
+ return
+ }
+ log.Info("dumpTables:")
+ all := pb.All()
+ for all.Scan() {
+ t := all.Next()
+ for i, o := range t.Order {
+ log.Info("got order:", t.Title, i, o)
+ }
+ }
+}
+
// everything from the application goes through here
func (me *TreeInfo) doAction(a widget.Action) {
+ if a.TablePB != nil {
+ log.Log(TREEWARN, "tree: got a TablePB")
+ me.doTable(a)
+ return
+ }
n := treeRoot.FindWidgetId(a.WidgetId)
switch a.ActionType {
case widget.Add: