Removed the NSNotificationCenter stuff since we're not using that to run UI operations on the main thread anymore.
This commit is contained in:
parent
1c6d4e9151
commit
ae8ccdca19
|
@ -13,15 +13,12 @@ import "C"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
_NSApplication = objc_getClass("NSApplication")
|
_NSApplication = objc_getClass("NSApplication")
|
||||||
_NSNotificationCenter = objc_getClass("NSNotificationCenter")
|
|
||||||
|
|
||||||
_sharedApplication = sel_getUid("sharedApplication")
|
_sharedApplication = sel_getUid("sharedApplication")
|
||||||
_defaultCenter = sel_getUid("defaultCenter")
|
|
||||||
_run = sel_getUid("run")
|
_run = sel_getUid("run")
|
||||||
)
|
)
|
||||||
|
|
||||||
var NSApp C.id
|
var NSApp C.id
|
||||||
var defNC C.id
|
|
||||||
var delegate C.id
|
var delegate C.id
|
||||||
var notesel C.SEL
|
var notesel C.SEL
|
||||||
|
|
||||||
|
@ -29,8 +26,6 @@ func init() {
|
||||||
// need an NSApplication first - see https://github.com/TooTallNate/NodObjC/issues/21
|
// need an NSApplication first - see https://github.com/TooTallNate/NodObjC/issues/21
|
||||||
NSApp = C.objc_msgSend_noargs(_NSApplication, _sharedApplication)
|
NSApp = C.objc_msgSend_noargs(_NSApplication, _sharedApplication)
|
||||||
|
|
||||||
defNC = C.objc_msgSend_noargs(_NSNotificationCenter, _defaultCenter)
|
|
||||||
|
|
||||||
selW := sel_getUid("windowShouldClose:")
|
selW := sel_getUid("windowShouldClose:")
|
||||||
selB := sel_getUid("buttonClicked:")
|
selB := sel_getUid("buttonClicked:")
|
||||||
selN := sel_getUid("gotNotification:")
|
selN := sel_getUid("gotNotification:")
|
||||||
|
|
Loading…
Reference in New Issue