|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||Notifications||MBS MacBase Plugin||9.7||Yes||No||No||Yes, macOS only||No|
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 which use this class:
- /AVFoundation/Screen Recorder
- /MacBase/Cocoa Menu Modification
- /MacBase/NSFileHandle async reading
- /MacCocoa/DiscRecording/DataBurn with Events and Notification
- /MacCocoa/Notifications/NSDistributedNotificationCenterMBS receiver
- /MacCocoa/Notifications/NSWorkspaceMBS notification receiver
- /MacCocoa/NSUserDefaultsDidChangeNotification Test
- /MacCocoa/NSWorkSpace Notifications
- /MacCocoa/readToEndOfFileInBackgroundAndNotify Test
- /MacFrameworks/Blocks/Blocks test
- /MacFrameworks/Blocks/Blocks test with delegate
- /MacFrameworks/CoreWLAN Events
The items on this page are in the following plugins: MBS MacBase Plugin.
MBS FileMaker Plugins