Platforms to show: All Mac Windows Linux Cross-Platform
NSNotificationMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Notifications | MBS MacBase Plugin | 9.7 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
An NSNotification object (referred to as a notification) contains a name, an object, and an optional dictionary. The name is a tag identifying the notification. The object is any object that the poster of the notification wants to send to observers of that notification (typically, it is the object that posted the notification). The dictionary stores other related objects, if any. NSNotification objects are immutable objects.
You can create a notification object with the class method notificationWithName. However, you don't usually create your own notifications directly. The NSNotificationCenter method postNotificationName allow you to conveniently post a notification without creating it first.
On Windows you can use WinNotificationMBS class for similar functionality.
This is for sending broadcast messages from one application to other application on same computer.
For the notification center in Mac OS X 10.8, please use NSUserNotificationMBS class.
- 6 properties
- property description as string
- property Handle as Integer
- property name as string
- property objectHandle as Integer
- property objectVariant as Variant
- property userInfo as dictionary
- 3 methods
- method Constructor(handle as Integer)
- method Constructor(name as string, theObject as Variant = nil, userInfo as dictionary = nil)
- method Print
- shared method notificationWithName(name as string, theObject as Variant = nil, userInfo as dictionary = nil) as NSNotificationMBS
This class has no sub classes.
Some methods using this class:
- NSClipViewMBS.viewBoundsChanged(notification as NSNotificationMBS)
- NSClipViewMBS.viewFrameChanged(notification as NSNotificationMBS)
- NSNotificationCenterMBS.postNotification(notification as NSNotificationMBS)
Some events using this class:
- DesktopNSSecureTextFieldControlMBS.TextDidChange(fieldEditor as NSTextMBS, notification as NSNotificationMBS)
- DesktopNSTextFieldControlMBS.TextDidBeginEditing(fieldEditor as NSTextMBS, notification as NSNotificationMBS)
- NSApplicationDelegateMBS.applicationWillTerminate(Notification as NSNotificationMBS)
- NSOutlineControlMBS.ItemWillExpand(notification as NSNotificationMBS, item as NSOutlineViewItemMBS)
- NSSearchFieldControlMBS.TextDidChange(fieldEditor as NSTextMBS, notification as NSNotificationMBS)
- NSSecureTextFieldControlMBS.TextDidChange(fieldEditor as NSTextMBS, notification as NSNotificationMBS)
- NSWindowDelegateMBS.windowDidBecomeMain(notification as NSNotificationMBS)
- NSWindowDelegateMBS.windowDidResignMain(notification as NSNotificationMBS)
- NSWindowDelegateMBS.windowWillEnterFullScreen(notification as NSNotificationMBS)
- NSWindowDelegateMBS.windowWillMove(notification as NSNotificationMBS)
Some examples using this class:
- /AVFoundation/Screen Recorder
- /MacCG/CoreText/CoreText Font Change Notification
- /MacCloud/iCloud Example/iCloud Example
- /MacCloud/Push Notification/Push Notification
- /MacCloud/Save and restore State
- /MacCocoa/NSSearchField control with menu
- /MacControls/Listbox and TableView Demos/NSOutlineView/Disk Browser
- /MacFrameworks/Blocks test
- /MacFrameworks/Cocoa Controls/TableView
- /PDFKit/PDFView iOS Test
Blog Entries
- MBS Xojo / Real Studio Plugins, version 14.3pr4
- MBS Xojo / Real Studio Plugins, version 14.2pr3
- MBS Real Studio Plugins, version 12.1pr5
- Windows Notifications
The items on this page are in the following plugins: MBS MacBase Plugin.
NSNotificationCenterMBS - NSNotificationObserverMBS