Skip to content

Commit b18d876

Browse files
authored
Merge pull request #23 from TotallyGamerJet/main
pass notification object instead of self
2 parents 4ba9425 + ed69203 commit b18d876

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cocoa/NSApplication.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ func NSApp() NSApplication {
4343
}
4444

4545
func NSApp_WithDidLaunch(cb func(notification objc.Object)) NSApplication {
46-
DefaultDelegateClass.AddMethod("applicationDidFinishLaunching:", cb)
46+
DefaultDelegateClass.AddMethod("applicationDidFinishLaunching:", func(_, notification objc.Object){
47+
cb(notification)
48+
})
4749
app := NSApp()
4850
app.SetDelegate(DefaultDelegate)
4951
return app

0 commit comments

Comments
 (0)