WINDOW: try to properly destroy a window
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
9960652ec7
commit
9c946630a1
|
@ -27,8 +27,10 @@ func (n *Node) AddButton(name string, custom func(*Node)) *Node {
|
|||
return n
|
||||
}
|
||||
button := ui.NewButton(name)
|
||||
log.Println("reflect.TypeOF(uiBox) =", reflect.TypeOf(n.uiBox))
|
||||
log.Println("reflect.TypeOF(uiButton) =", reflect.TypeOf(button))
|
||||
if (Config.Debug) {
|
||||
log.Println("reflect.TypeOF(uiBox) =", reflect.TypeOf(n.uiBox))
|
||||
log.Println("reflect.TypeOF(uiButton) =", reflect.TypeOf(button))
|
||||
}
|
||||
// true == expand, false == make normal size button
|
||||
n.uiBox.Append(button, false)
|
||||
n.uiButton = button
|
||||
|
|
|
@ -120,6 +120,13 @@ func NewWindow() *Node {
|
|||
|
||||
if (Data.NodeMap[title] != nil) {
|
||||
log.Println("Duplicate window name =", title)
|
||||
Data.NodeMap[title].Dump()
|
||||
Data.NodeMap[title].ListChildren(false)
|
||||
uiW := Data.NodeMap[title].uiWindow
|
||||
if (uiW != nil) {
|
||||
uiW.Show()
|
||||
}
|
||||
panic("check here to see if window is really alive")
|
||||
return Data.NodeMap[title]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue