From 859c240a2119d799ecae59be67e9ad96e1aa7b92 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 1 Mar 2014 20:41:30 -0500 Subject: [PATCH] Some error message and TODO changes related to the previous commit. --- todo.md | 1 - uitask_darwin.go | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/todo.md b/todo.md index 1a77ded..92bdd6e 100644 --- a/todo.md +++ b/todo.md @@ -26,7 +26,6 @@ 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 - Cocoa coordinates have (0,0) at the bottom left: need to fix this somehow -- Cocoa windows cannot be live-resized - there's no GTK+ error handling whatsoever; we need to figure out how it works - make sure GTK+ documentation point differences don't matter - button sizes and LineEdit sizes on Windows seem too big; Comboboxes have margins diff --git a/uitask_darwin.go b/uitask_darwin.go index c61ede0..0d0e377 100644 --- a/uitask_darwin.go +++ b/uitask_darwin.go @@ -75,9 +75,10 @@ func initCocoa() (NSApp C.id, err error) { r := C.objc_msgSend_int(NSApp, _setActivationPolicy, 0) // NSApplicationActivationPolicyRegular if C.BOOL(uintptr(unsafe.Pointer(r))) != C.BOOL(C.YES) { - err = fmt.Errorf("error setting NSApplication activation policy (basically identifies our program as a separate program; needed for several things, such as Dock icon, menu, window resizing, etc.) (unknown reason)") + err = fmt.Errorf("error setting NSApplication activation policy (basically identifies our program as a separate program; needed for several things, such as Dock icon, application menu, window resizing, etc.) (unknown reason)") return } + // TODO we need to call [NSApp activateIgnoringOtherApps:YES] here when we are ready to have the program become active (for now I won't) err = mkAppDelegate() return }