|class||Notifications||MBS MacBase Plugin||9.7||✅ Yes||❌ No||❌ No||✅ Yes||All|
To use this class, please create a subclass. There you can put code in the event handler to do whatever you need in case your notification is received.
Than you create in code objects form this class. Normally only one. And you call addObserver on the NSNotificationCenterMBS or NSDistributedNotificationCenterMBS objects you have to tell the system which notifications you want to receive.
Do not forget to call removeObserver on the notification center for all your observers to avoid crashes.
- event GotNotification(notification as NSNotificationMBS)
- property Handle as Integer
- 2 methods
This class has no sub classes.
Some methods using this class:
- DRNotificationCenterMBS.addObserver(observer as NSNotificationObserverMBS, name as string="", theObject as Variant=nil)
- DRNotificationCenterMBS.removeObserver(observer as NSNotificationObserverMBS, name as string, theObject as Variant=nil)
- NSDistributedNotificationCenterMBS.addObserver(observer as NSNotificationObserverMBS, name as string, theObject as Variant, suspensionBehavior as Integer)
- NSNotificationCenterMBS.addObserver(observer as NSNotificationObserverMBS, name as string="", theObject as Variant=nil)
- NSNotificationCenterMBS.removeObserver(observer as NSNotificationObserverMBS)
- NSNotificationCenterMBS.removeObserver(observer as NSNotificationObserverMBS, name as string, theObject as Variant=nil)
Some examples using this class:
- /AVFoundation/Screen Recorder
- /MacBase/Cocoa Menu Modification
- /MacBase/NSFileHandle async reading
- /MacCG/CoreText/CoreText Font Change Notification
- /MacCocoa/DiscRecording/DataBurn with Events and Notification
- /MacCocoa/Notifications/NSDistributedNotificationCenterMBS receiver
- /MacCocoa/Notifications/NSWorkspaceMBS notification receiver
- /MacCocoa/NSUserDefaultsDidChangeNotification Test
- /MacCocoa/readToEndOfFileInBackgroundAndNotify Test
The items on this page are in the following plugins: MBS MacBase Plugin.
Feedback: Report problem or ask question.