summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--table.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/table.go b/table.go
index 34202a8..e98e8a0 100644
--- a/table.go
+++ b/table.go
@@ -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) {