PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: TomCornilliac on January 17, 2008, 06:18:55



Title: sendNotificatoin or facade.notifyObservers in Mediator
Post by: TomCornilliac on January 17, 2008, 06:18:55
I'm not sure what the difference (if any) between using sendNotification and facade.notifyObservers within a Mediator. Anyone? Thanks!


Title: Re: sendNotificatoin or facade.notifyObservers in Mediator
Post by: Joel Hooks on January 17, 2008, 06:57:31
They serve the exact same purpose. sendNotification is a shortcut

as per the API docs:

:
sendNotification () method
public function sendNotification(notificationName:String, body:Object = null, type:String = null):void

Send a INotification.

Convenience method to prevent having to construct new notification instances in our implementation code.