diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-01 14:08:53 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-01 14:08:53 -0500 |
| commit | c8c257f8c84c163354a2b3ba7c97bd76f2700443 (patch) | |
| tree | 5dee2b14eb7ead9d02dc7bfeffc79bd2e4dcc1a3 /uitask_darwin.go | |
| parent | b6b8ee6a8227d544bae58192527743cdb13e61e8 (diff) | |
Fixed a minor startup failure on Mac OS X; now for a big one: apparently the thread that calls -[NSApplication run] is NOT the main thread...
Diffstat (limited to 'uitask_darwin.go')
| -rw-r--r-- | uitask_darwin.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/uitask_darwin.go b/uitask_darwin.go index 4417528..3a6d633 100644 --- a/uitask_darwin.go +++ b/uitask_darwin.go @@ -100,7 +100,9 @@ func mainThread() { mtret <- fmt.Errorf("error adding NSApplication delegate uitask: method (to do UI tasks): %v", err) return } - appDelegate := objc_new(objc_getClass(_goAppDelegate)) + // TODO using objc_new() causes a segfault; find out why + // TODO make alloc followed by init (I thought NSObject provided its own init?) + appDelegate := objc_alloc(objc_getClass(_goAppDelegate)) objc_setDelegate(_NSApp, appDelegate) // and that's it, really C.objc_msgSend_noargs(_NSApp, _run) |
