2014-02-11 17:57:03 -06:00
|
|
|
// 11 february 2014
|
2014-02-19 10:41:10 -06:00
|
|
|
package ui
|
2014-02-11 17:57:03 -06:00
|
|
|
|
2014-03-01 14:18:29 -06:00
|
|
|
// Go sets up the UI environment and runs main in a goroutine.
|
2014-03-01 14:23:49 -06:00
|
|
|
// If initialization fails, Go returns an error and main is not called.
|
2014-03-01 14:18:29 -06:00
|
|
|
// Otherwise, Go does not return to its caller until (unless? TODO) the application loop exits, at which point it returns nil.
|
|
|
|
//
|
|
|
|
// This model is undesirable, but Cocoa limitations require it.
|
|
|
|
func Go(main func()) error {
|
|
|
|
return ui(main)
|
2014-02-11 17:57:03 -06:00
|
|
|
}
|