PureMVC Framework for haXe: API Documentation
Back | Index
class org.puremvc.haxe.core.View
implements org.puremvc.haxe.interfaces.IView

A Singleton IView implementation.

In PureMVC, the View class assumes these responsibilities:

function new() : Void

Constructor.

This IView implementation is a Singleton, so you should not call the constructor directly, but instead call the static Singleton Factory method View.getInstance()

function hasMediator(mediatorName : String) : Bool
Check if a Mediator is registered or not
function notifyObservers(notification : org.puremvc.haxe.interfaces.INotification) : Void

Notify the IObservers for a particular INotification.

All previously attached IObservers for this INotification's list are notified and are passed a reference to the INotification in the order in which they were registered.

function registerMediator(mediator : org.puremvc.haxe.interfaces.IMediator) : Void

Register an IMediator instance with the View.

Registers the IMediator so that it can be retrieved by name, and further interrogates the IMediator for its INotification interests.

If the IMediator returns any INotification names to be notified about, an Observer is created encapsulating the IMediator instance's handleNotification method and registering it as an Observer for all INotifications the IMediator is interested in.

function registerObserver(notificationName : String, observer : org.puremvc.haxe.interfaces.IObserver) : Void
Register an IObserver to be notified of INotifications with a given name.
function removeMediator(mediatorName : String) : org.puremvc.haxe.interfaces.IMediator
Remove an IMediator from the View.
function removeObserver(notificationName : String, notifyContext : Dynamic) : Void
Remove the observer for a given notifyContext from an observer list for a given Notification name.
function retrieveMediator(mediatorName : String) : org.puremvc.haxe.interfaces.IMediator
Retrieve an IMediator from the View.
static function getInstance() : org.puremvc.haxe.interfaces.IView
View Singleton Factory method.
Back | Index