summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.go4
-rw-r--r--todo.md1
2 files changed, 3 insertions, 2 deletions
diff --git a/init.go b/init.go
index 56b4571..943d60d 100644
--- a/init.go
+++ b/init.go
@@ -3,7 +3,9 @@ package ui
// Go sets up the UI environment and runs main in a goroutine.
// If initialization fails, Go returns an error and main is not called.
-// Otherwise, Go does not return to its caller until (unless? TODO) the application loop exits, at which point it returns nil.
+// Otherwise, Go does not return to its caller until main does, at which point it returns nil.
+// 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.)
//
// This model is undesirable, but Cocoa limitations require it.
func Go(main func()) error {
diff --git a/todo.md b/todo.md
index dd8a1d1..b8f12f1 100644
--- a/todo.md
+++ b/todo.md
@@ -25,7 +25,6 @@ so I don't forget:
- should message box text be selectable on all platforms or only on those that make it the default?
important things:
-- ui.Go() should exit when the main() you pass in exits
- because the main event loop is not called if initialization fails, it is presently impossible for MsgBoxError() to work if UI initialization fails; this basically means we cannot allow initializiation to fail on Mac OS X if we want to be able to report UI init failures to the user with one
- figure out where to auto-place windows in Cocoa (also window coordinates are still not flipped properly so (0,0) on screen is the bottom-left)
- also provide a method to center windoes; Cocoa provides one for us but