Skip to content

Commit

Permalink
Merge pull request #23 from TotallyGamerJet/main
Browse files Browse the repository at this point in the history
pass notification object instead of self
  • Loading branch information
progrium authored Mar 8, 2021
2 parents 4ba9425 + ed69203 commit b18d876
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cocoa/NSApplication.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ func NSApp() NSApplication {
}

func NSApp_WithDidLaunch(cb func(notification objc.Object)) NSApplication {
DefaultDelegateClass.AddMethod("applicationDidFinishLaunching:", cb)
DefaultDelegateClass.AddMethod("applicationDidFinishLaunching:", func(_, notification objc.Object){
cb(notification)
})
app := NSApp()
app.SetDelegate(DefaultDelegate)
return app
Expand Down

0 comments on commit b18d876

Please sign in to comment.