diff options
| author | Jeff Carr <[email protected]> | 2021-10-28 10:39:33 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-28 10:39:33 -0500 |
| commit | c97cb89b4a154548891173764a4310e3be5b1a2c (patch) | |
| tree | 2002a0666850ccdf561085209a0189cd4de08fa8 /box.go | |
| parent | 2b85dda8006adacc7b5b0c5594033226097e9214 (diff) | |
DOCS: clean up variable names for node.*() functionsv0.0.5
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'box.go')
| -rw-r--r-- | box.go | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -73,17 +73,18 @@ func add(box *GuiBox, newbox *GuiBox) { log.Println("gui.add() END") } -func (parent *Node) NewBox(axis int, name string) *Node { - if (parent.box == nil) { - panic("gui.Node.NewBox() parent.box == nil") +func (n *Node) NewBox(axis int, name string) *Node { + if (n.box == nil) { + log.Println("box == nil. I can't add a box!") + panic("gui.Node.NewBox() node.box == nil") } newBox := new(GuiBox) - newBox.Window = parent.window + newBox.Window = n.window newBox.Name = name // make a new box & a new node - newNode := parent.makeNode(name, 111, 100 + Config.counter) + newNode := n.makeNode(name, 111, 100 + Config.counter) Config.counter += 1 var uiBox *ui.Box @@ -96,7 +97,7 @@ func (parent *Node) NewBox(axis int, name string) *Node { newBox.UiBox = uiBox newNode.uiBox = uiBox - parent.Append(newNode) + n.Append(newNode) // add(n.box, newBox) return newNode } |
