diff options
| -rw-r--r-- | table.go | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -57,6 +57,7 @@ func ShowTable(pb *guipb.Table) { func (parent *Node) ShowTable(pb *guipb.Table) { // make a new action and populate the current node state + // this should be parent and not rootNode? a := getNewAction(me.rootNode, widget.Show) pb.Parent = new(guipb.Widget) @@ -74,7 +75,21 @@ func (parent *Node) ShowTable(pb *guipb.Table) { } log.Info("send action to plugin", "pb len =", len(a.TablePB)) sendActionToPlugin(a) +} + +func (parent *Node) UpdateTable(pb *guipb.Table) { + log.Info("UpdateTable:", pb.Title) + a := getNewAction(parent, widget.Show) + nt := guipb.NewTables() + nt.Append(pb) + a.TablePB, err = nt.Marshal() + if err != nil { + log.Info("unmarshal error", err) + return + } + log.Info("send action to plugin", "pb len =", len(a.TablePB)) + sendActionToPlugin(a) } func makeTableWidgets(pb *guipb.Table) { |
