summaryrefslogtreecommitdiff
path: root/table.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-23 04:56:49 -0600
committerJeff Carr <[email protected]>2025-02-23 13:13:30 -0600
commitfd12319491c83c799b8cf32197039bcd2d959ebc (patch)
tree3d1cadd3bb2699211a209767bd5f1a32c5c90afb /table.go
parent30cc0f0918f4699a354ab4ffdb465f69f26441d8 (diff)
attempt to send update to plugin
Diffstat (limited to 'table.go')
-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) {