diff options
| author | Jeff Carr <[email protected]> | 2025-02-18 20:10:26 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-19 17:39:45 -0600 |
| commit | 27c9417a32cb704537037aacc727e53ff933b5f3 (patch) | |
| tree | 5d0445ca9a7b0b09ad91041acfd165d566b7132d | |
| parent | fd24d2ee0d5339080ef3b4096e1c69b5d12f2be1 (diff) | |
testing on tables
| -rw-r--r-- | action.go | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -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: |
