try to find the parent window
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
e71d4f10ca
commit
22e0033c69
9
tab.go
9
tab.go
|
@ -12,13 +12,18 @@ func (n *Node) NewTab(text string) *Node {
|
||||||
|
|
||||||
if (n.WidgetType != toolkit.Window) {
|
if (n.WidgetType != toolkit.Window) {
|
||||||
// figure out what the actual window is
|
// 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) {
|
if (n.parent.WidgetType == toolkit.Window) {
|
||||||
return n.parent.NewTab(text)
|
|
||||||
} else {
|
} else {
|
||||||
|
if (n.parent.WidgetType == toolkit.Window) {
|
||||||
|
return n.parent.NewTab(text)
|
||||||
// TODO: find a window. any window. never give up. never die.
|
// TODO: find a window. any window. never give up. never die.
|
||||||
panic("NewTab did not get passed a window")
|
panic("NewTab did not get passed a window")
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
newNode := n.newNode(text, toolkit.Tab, nil)
|
newNode := n.newNode(text, toolkit.Tab, nil)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
// Copyright 2014 The gocui Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -34,7 +30,6 @@ func showMsg(g *gocui.Gui, v *gocui.View) error {
|
||||||
if l, err = v.Line(cy); err != nil {
|
if l, err = v.Line(cy); err != nil {
|
||||||
l = ""
|
l = ""
|
||||||
}
|
}
|
||||||
// setOutput(me.rootNode)
|
|
||||||
|
|
||||||
makeOutputWidget(g, l)
|
makeOutputWidget(g, l)
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue