summaryrefslogtreecommitdiff
path: root/tab.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-24 08:45:30 -0500
committerJeff Carr <[email protected]>2023-04-24 08:45:30 -0500
commitcd998e95c1bae4e5e31ef9dced6d8f3c0095d46e (patch)
treefeedbd085d32aa489446af3a605c61615272dfbc /tab.go
parent7006281da1053661a50acec0bcb9aa94cbbcf199 (diff)
try to find the parent window
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'tab.go')
-rw-r--r--tab.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/tab.go b/tab.go
index c19ecb5..5cdc0ad 100644
--- a/tab.go
+++ b/tab.go
@@ -12,13 +12,18 @@ func (n *Node) NewTab(text string) *Node {
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")
+ log(logError, "NewTab() is being requested on something that isn't a Window. node =", n)
+ log(logError, "NewTab() parent", n.parent)
+ return n.parent.NewTab(text)
+ /*
if (n.parent.WidgetType == toolkit.Window) {
- return n.parent.NewTab(text)
} else {
+ if (n.parent.WidgetType == toolkit.Window) {
+ return n.parent.NewTab(text)
// 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)