Added a note in ui.Go() about it needing to be run from main().

This commit is contained in:
Pietro Gagliardi 2014-03-12 21:42:25 -04:00
parent 9beeeb6371
commit eb48ed09c3
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,8 @@ package ui
// After it returns, you cannot call future ui functions/methods meaningfully.
// (TODO ideally we would want to be able to call ui.MsgBoxError() to report failures to the user, but I would need to figure out how to do this on platforms other than Windows.)
//
// It is not safe to call ui.Go() in a goroutine. It must be called directly from main().
//
// This model is undesirable, but Cocoa limitations require it.
func Go(main func()) error {
return ui(main)