diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-12 10:43:57 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-12 10:43:57 -0500 |
| commit | 3f8fe0e7108c1cd87e177bed22e3307c9df03e63 (patch) | |
| tree | e34a7dd419bf2649dc24f5dbf89e6d825179f55d /window.go | |
| parent | f93bebfeec42aeee07f43fcf6466b93f073b6111 (diff) | |
Separated initial text from sysData and fixed errors in the previous commits.
Diffstat (limited to 'window.go')
| -rw-r--r-- | window.go | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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") } |
