inconduit
|
 |
« on: February 20, 2009, 11:32:01 » |
|
i'm new to pureMVC, so tell me if i'm going in the completely wrong direction.
i'm wondering if i need a ViewComponent registry, similar to the registries for mediators and proxies.
i have a custom view component, MediaPlaybackUI. i create them dynamically at runtime, there can be multiple instance. i do the construction of MediaPlaybackUI in a Command, then send a Notification of this new instance.
elsewhere, a Mediator is listening for this notification. the Mediator has a reference to a class i've called MediaDisplayUIsLayoutManager, which deals with the visual layout of all the MediaPlaybackUI instances.
should i store the MediaPlaybackUI instance in a view component registry, and then retrieve it when the notification of the new instance gets to the Mediator? or should i pass a reference the new MediaPlaybackUI instance inside the body of the Notification?
if a ViewComponent registry is the right way to go, should i add registerView/removeView/retrieveView to ApplicationFacade, and cast facade to ApplicationFacade each time i need to access the view component registry?
thanks for the help
|