From 3f8fe0e7108c1cd87e177bed22e3307c9df03e63 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 12 Feb 2014 10:43:57 -0500 Subject: Separated initial text from sysData and fixed errors in the previous commits. --- window.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'window.go') diff --git a/window.go b/window.go index 50d4dbb..77dc674 100644 --- a/window.go +++ b/window.go @@ -18,6 +18,7 @@ type Window struct { created bool control Control sysData *sysData + initText string } // NewWindow creates a new window with the given title. The window is not constructed at the OS level until a call to Open(). @@ -26,9 +27,9 @@ func NewWindow(title string) *Window { sysData: &sysData{ cSysData: cSysData{ ctype: c_window, - text: title, }, }, + initText: title, } } @@ -54,7 +55,7 @@ func (w *Window) Open() (err error) { // If the window has already been created, show it. if !w.created { w.sysData.closing = w.Closing - err = w.sysData.make() + err = w.sysData.make(w.initText) if err != nil { return err } @@ -82,6 +83,6 @@ func (w *Window) apply() error { func (w *Window) setParent(c Control) { panic("Window.setParent() should never be called") } -func (w *Window) setParentWindow(w *Window) { +func (w *Window) setParentWindow(w2 *Window) { panic("Window.setParent() should never be called") } -- cgit v1.2.3