Oops, accidentally removed the code that actually makes the appdelegateclass. Almost working...
This commit is contained in:
parent
2e869615d3
commit
cd7c127fcc
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue