diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-01 14:05:14 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-01 14:05:14 -0500 |
| commit | b6b8ee6a8227d544bae58192527743cdb13e61e8 (patch) | |
| tree | d84c318924db19bd61d8ad8b6dfe302909a7a76e | |
| parent | 00243442d2ed438e1e581b00aae369a2eb9836d9 (diff) | |
Fixed the compiler errors on Mac OS X; now to get it running...
| -rw-r--r-- | delegatetypes_darwin.go | 4 | ||||
| -rw-r--r-- | uitask_darwin.go | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/delegatetypes_darwin.go b/delegatetypes_darwin.go index d9e420a..2bc3498 100644 --- a/delegatetypes_darwin.go +++ b/delegatetypes_darwin.go @@ -17,13 +17,13 @@ var ( _NSObject_Class = C.object_getClass(_NSObject) ) -func newDelegateClass(name string) (C.Class, error) { +func makeDelegateClass(name string) (C.Class, error) { cname := C.CString(name) defer C.free(unsafe.Pointer(cname)) c := C.objc_allocateClassPair(_NSObject_Class, cname, 0) if c == C.NilClass { - return fmt.Errorf("unable to create Objective-C class %s; reason unknown", name) + return C.NilClass, fmt.Errorf("unable to create Objective-C class %s; reason unknown", name) } C.objc_registerClassPair(c) return c, nil diff --git a/uitask_darwin.go b/uitask_darwin.go index ccc659d..4417528 100644 --- a/uitask_darwin.go +++ b/uitask_darwin.go @@ -21,6 +21,10 @@ We will create an Objective-C class goAppDelegate. It contains two methods: // extern void appDelegate_uitask(id, SEL, id); import "C" +// temporary for now +func msgBox(string, string){} +func msgBoxError(string, string){} + var uitask chan func() var mtret chan interface{} @@ -43,7 +47,7 @@ func ui(initDone chan error) { mtret = make(chan interface{}) go mainThread() v := <-mtret - if err, ok := v.(error); err { + if err, ok := v.(error); ok { initDone <- fmt.Errorf("error initializing Cocoa: %v", err) return } |
