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: