It seems that I can’t control the NSApp delegate from within a System Preferences pane, which is understandable. Is there any other way I can have my object notified when the program becomes active?
It seems that I can’t control the NSApp delegate from within a System Preferences
Share
Most delegate methods in the Cocoa frameworks are simply notification methods. This includes
application{Will,Did}{Become,Resign}Active:, which are notification methods forNSApplication{Will,Did}{Become,Resign}ActiveNotification. The notifications are in the same place as the delegate methods: the NSApplication documentation.So, just sign up for those notifications on the local
NSNotificationCenter.