PureMVC Framework for haXe: API Documentation
Back | Index
interface org.puremvc.haxe.interfaces.IObserver

The interface definition for a PureMVC Observer.

In PureMVC, IObserver implementors assume these responsibilities:

PureMVC does not rely upon underlying event models such as the one provided with Flash.

The Observer Pattern as implemented within PureMVC exists to support event driven communication between the application and the actors of the MVC triad.

An Observer is an object that encapsulates information about an interested object with a notification method that should be called when an INotification is broadcast. The Observer then acts as a proxy for notifying the interested object.

Observers can receive Notifications by having their notifyObserver method invoked, passing in an object implementing the INotification interface, such as a subclass of Notification.

function compareNotifyContext(object : Dynamic) : Bool
Compare the given object to the notificaiton context object.
function notifyObserver(notification : INotification) : Void
Notify the interested object.
function setNotifyContext(notifyContext : Dynamic) : Void
Set the notification context.
function setNotifyMethod(notifyMethod : Dynamic -> Void) : Void

Set the notification method.

The notification method should take one parameter of type INotification

Back | Index