Constructor.
The name of the notification.
Optional
body: anyOptional data to be included with the notification.
Optional
type: stringOptional type of the notification.
Get the body of the Notification
instance.
The body of the notification.
Set the body of the Notification
instance.
The new body to be set for the notification.
Get the name of the Notification
instance.
The name of the notification.
Get the type of the Notification
instance.
The type of the notification, or undefined
if not set.
Set the type of the Notification
instance.
The new type to be set for the notification.
A base
Notification
implementation.PureMVC does not rely upon underlying event models such as the one provided with Flash, and ActionScript 3 does not have an inherent event model.
The Observer Pattern as implemented within PureMVC exists to support event-driven communication between the application and the actors of the MVC triad.
Notifications are not meant to be a replacement for Events in Flex/Flash/Apollo. Generally,
Mediator
implementors place event listeners on their view components, which they then handle in the usual way. This may lead to the broadcast ofNotification
s to triggerCommand
s or to communicate with otherMediators
.Proxy
andCommand
instances communicate with each other andMediator
s by broadcastingNotification
s.A key difference between Flash
Event
s and PureMVCNotification
s is thatEvent
s follow the 'Chain of Responsibility' pattern, 'bubbling' up the display hierarchy until some parent component handles theEvent
, while PureMVCNotification
s follow a 'Publish/Subscribe' pattern. PureMVC classes need not be related to each other in a parent/child relationship in order to communicate with one another usingNotification
s.Notification