diff options
| author | Jeff Carr <[email protected]> | 2021-10-31 20:52:19 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-31 20:52:19 -0500 |
| commit | 7fecc2b2a8c87386c0a51c6e4e3942e2def8f514 (patch) | |
| tree | 0dc46ff8f20042ade44e5abfdd53e6f50fbec184 /new-structs.go | |
| parent | 39a9970c66d5df9822ff86f3c90813cff9a4c274 (diff) | |
BOX: more removals of GuiBox
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'new-structs.go')
| -rw-r--r-- | new-structs.go | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/new-structs.go b/new-structs.go index 8097fbc..d821a3f 100644 --- a/new-structs.go +++ b/new-structs.go @@ -98,12 +98,6 @@ func (n *Node) Dump() { } } -/* -func (n *Node) SetBox(box *GuiBox) { - n.box = box -} -*/ - func (n *Node) SetName(name string) { // n.uiType.SetName(name) if (n.uiWindow != nil) { @@ -207,13 +201,13 @@ func (n *Node) ListChildren(dump bool) { // // This function should make a new node with the parent and // the 'stuff' Node as a child -func (n *Node) AddTabNode(title string, b *GuiBox) *Node { +func (n *Node) AddTabNode(title string) *Node { var newNode *Node parent := n newNode = parent.makeNode(title, 444, 400 + Config.counter) newNode.uiTab = parent.uiTab - newNode.box = b + // newNode.box = b if (Config.DebugNode) { fmt.Println("") @@ -225,12 +219,12 @@ func (n *Node) AddTabNode(title string, b *GuiBox) *Node { newNode.Dump() } - if (newNode.uiTab == nil) { + if (newNode.uiTab != nil) { log.Println("wit/gui/ AddTabNode() Something went wrong tab == nil") // TODO: try to find the tab or window and make them if need be - return newNode + // newNode.uiTab.Append(title, b.UiBox) + panic("newNode.uiTab") } - newNode.uiTab.Append(title, b.UiBox) return newNode } @@ -245,7 +239,7 @@ func (n *Node) AddTab(title string, uiC *ui.Box) *Node { } if parent.box == nil { parent.Dump() - panic("gui.AddTab() ERROR box == nil") + // panic("gui.AddTab() ERROR box == nil") } if parent.uiTab == nil { inittab := ui.NewTab() // no, not that 'inittab' |
