diff options
| author | Jeff Carr <[email protected]> | 2023-04-23 14:18:34 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-23 14:18:34 -0500 |
| commit | 890fe6740e7810e7eadd5cad21fefe2e99fd2d76 (patch) | |
| tree | fdc556520d48b4864656516be38f815b3ca339ec /tab.go | |
| parent | 36894c8b38c6ef3a722ef00fa5d3aeddcef5724e (diff) | |
andlabs: artificial delay. queue() all add's
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'tab.go')
| -rw-r--r-- | tab.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -8,6 +8,18 @@ import ( // the 'tab' as a child func (n *Node) NewTab(text string) *Node { + // check to make sure n is actually a window + + if (n.WidgetType != toolkit.Window) { + // figure out what the actual window is + log(logError, "NewTab() is being requested on something that isn't a Window") + if (n.parent.WidgetType == toolkit.Window) { + return n.parent.NewTab(text) + } else { + // TODO: find a window. any window. never give up. never die. + panic("NewTab did not get passed a window") + } + } newNode := n.newNode(text, toolkit.Tab, nil) var a toolkit.Action |
