diff options
| author | Jeff Carr <[email protected]> | 2025-02-18 20:09:38 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-19 17:39:45 -0600 |
| commit | 4087d77add8579b0fa0c738830d07ab3af6aad02 (patch) | |
| tree | d6178e12b695cbf9fadb394f2a6335fb33b703d0 /table.go | |
| parent | 5f358634a5c881091cd7696e295d935ac11f737a (diff) | |
work on tables
Diffstat (limited to 'table.go')
| -rw-r--r-- | table.go | 39 |
1 files changed, 31 insertions, 8 deletions
@@ -52,23 +52,46 @@ func RefreshTime(t *time.Duration) { } */ +func NewTable(title string) *NodeTable { + t := new(NodeTable) + /* + t.pb = new(guipb.Table) + t.pb.Title = title + */ + t.n = me.rootNode.newNode(title, widget.Table) + t.n.label = title + + return t +} + +type NodeColumn struct { + Title string + Vals []string +} + type NodeTable struct { - n *Node - pb *guipb.Table + n *Node + // pb *guipb.Table } -func (t *NodeTable) ShowTable() { +func (t *NodeTable) ShowTable(pb *guipb.Table) { + log.Info("gui.ShowTable") // make a new action and populate the current node state a := getNewAction(t.n, widget.Show) - if t.pb == nil { - log.Info("error: TablePB == nil") - return - } - a.TablePB, err = t.pb.Marshal() + /* + if t.pb == nil { + log.Info("error: TablePB == nil") + return + } + */ + 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", t.n.label, "pb len =", len(a.TablePB)) sendActionToPlugin(a) /* |
