From fd12319491c83c799b8cf32197039bcd2d959ebc Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 23 Feb 2025 04:56:49 -0600 Subject: attempt to send update to plugin --- table.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'table.go') 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) { -- cgit v1.2.3