Oops, accidentally removed the code that actually makes the appdelegateclass. Almost working...

This commit is contained in:
Pietro Gagliardi 2014-03-01 15:33:17 -05:00
parent 2e869615d3
commit cd7c127fcc
1 changed files with 5 additions and 0 deletions

View File

@ -87,6 +87,11 @@ func initCocoa() (NSApp C.id, appDelegate C.id, err error) {
var appdelegateclass C.Class var appdelegateclass C.Class
NSApp = C.objc_msgSend_noargs(_NSApplication, _sharedApplication) NSApp = C.objc_msgSend_noargs(_NSApplication, _sharedApplication)
appdelegateclass, err = makeDelegateClass(_goAppDelegate)
if err != nil {
err = fmt.Errorf("error creating NSApplication delegate: %v", err)
return
}
err = addDelegateMethod(appdelegateclass, _uitask, C.appDelegate_uitask) err = addDelegateMethod(appdelegateclass, _uitask, C.appDelegate_uitask)
if err != nil { if err != nil {
err = fmt.Errorf("error adding NSApplication delegate uitask: method (to do UI tasks): %v", err) err = fmt.Errorf("error adding NSApplication delegate uitask: method (to do UI tasks): %v", err)