Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSNotificationMBS class.

NSNotificationMBS.description as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Notifications MBS MacBase Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The descriptor for this notification.
Example
dim n as NSNotificationMBS = NSNotificationMBS.notificationWithName("Hello")
MsgBox n.description

This is a text representation for debugging.
(Read only property)

NSNotificationMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Notifications MBS MacBase Plugin 9.7 ✅ Yes ❌ No ❌ No ✅ Yes All
The internal reference to the NSNotification object.

(Read and Write property)

NSNotificationMBS.name as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Notifications MBS MacBase Plugin 9.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the name of the notification.

The name of the notification. Typically you use this method to find out what kind of notification you are dealing with when you receive a notification.
Notification names can be any string. To avoid name collisions, you might want to use a prefix that's specific to your application.
(Read only property)

NSNotificationMBS.objectHandle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Notifications MBS MacBase Plugin 9.7 ✅ Yes ❌ No ❌ No ✅ Yes All
The reference to the object.

May be useful for declares.
(Read only property)

Some examples using this property:

NSNotificationMBS.objectVariant as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Notifications MBS MacBase Plugin 9.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the object associated with the notification.

The object associated with the notification. This is often the object that posted this notification. It may be nil.
Typically you use this method to find out what object a notification applies to when you receive a notification.

See the FAQ for the list of supported NSObject types for variant conversion.
(Read only property)

Some examples using this property:

NSNotificationMBS.userInfo as dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Notifications MBS MacBase Plugin 9.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the user information dictionary associated with the receiver.
Example
// tests dictionary conversion:

dim d as new Dictionary

dim x as new Dictionary
x.Value("Hello") = "World"

dim b as Boolean = true
dim s as Single = 2.3
dim dd as Double = 3.4
dim h as int64 = 1234

d.Value(1) = 1
d.Value(2) = 2.0
d.Value(3) = x
d.Value(4) = "Hello"
d.Value(5) = b
d.Value(6) = s
d.Value(7) = dd
d.Value(8) = h

dim n as new NSNotificationMBS("test", nil, d)

dim nd as Dictionary = n.userInfo

// check nd object
break

Returns the user information dictionary associated with the receiver. May be nil.
The user information dictionary stores any additional objects that objects receiving the notification might use.
(Read only property)

The items on this page are in the following plugins: MBS MacBase Plugin.


The biggest plugin in space...