Made the application-modal sentinel in dialog.go non-nil to prevent weird behavior on nil Windows in program code. Thanks to xtg in the Gopher Academy Slack for corroborating.

This commit is contained in:
Pietro Gagliardi 2014-06-08 13:00:21 -04:00
parent bb6de0de48
commit 41085768e7
1 changed files with 3 additions and 2 deletions

View File

@ -6,8 +6,9 @@ import (
// ...
)
// sentinel (presently nil; may be a private instance if subtle bugs start showing up in user code)
var dialogWindow *Window
// sentinel (not nil so programmer errors don't go undetected)
// this window is invalid and cannot be used directly
var dialogWindow = new(Window)
// MsgBox displays an informational message box to the user with just an OK button.
// primaryText should be a short string describing the message, and will be displayed with additional emphasis on platforms that support it.