MVP strategy/perspective

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MVP strategy/perspective

Shaping-3
I have a top level MyPresenter subclassing Presenter.  It has buttons and a
pluggable subPresenter.  Some of the buttons plug a number of different but
similar Presenters into a fixed area in the window.  Other buttons stimulate
the current Presenter.  All of these subPresenters respond in similar ways
to MyPresenter's buttons.  I'm assuming then that MyPresenter would
dynamically assign different subPresenters to a currentPresenter instance
variable in MyPresenter, and at the same time wire MyPresenter's button
events to the corresponding ones on the subPresenter.  Is this the best way?

The Presenters have various uniquely arranged alphanumeric text fields.  I
will have for each Presenter defaultModels where state is kept, and matching
Views for each Presenter, because field arrangements are unique.

I don't see, off-hand, what view I should place in the VC to accommodate the
current subPresenter.


Shaping


Reply | Threaded
Open this post in threaded view
|

Re: MVP strategy/perspective

Don Rylander-3
"Shaping" <[hidden email]> wrote in message
news:[hidden email]...
>I have a top level MyPresenter subclassing Presenter.  It has buttons and a
>pluggable subPresenter.  Some of the buttons plug a number of different but
>similar Presenters into a fixed area in the window.  Other buttons
>stimulate the current Presenter.  All of these subPresenters respond in
>similar ways to MyPresenter's buttons.  I'm assuming then that MyPresenter
>would dynamically assign different subPresenters to a currentPresenter
>instance variable in MyPresenter, and at the same time wire MyPresenter's
>button events to the corresponding ones on the subPresenter.  Is this the
>best way?

Something like this came up back in December in the "Switching views?"
thread.  Chris Uppal suggested using the WizardCardPresenter, which strikes
me as a clean solution for most cases.

HTH,

Don

>
> The Presenters have various uniquely arranged alphanumeric text fields.  I
> will have for each Presenter defaultModels where state is kept, and
> matching Views for each Presenter, because field arrangements are unique.
>
> I don't see, off-hand, what view I should place in the VC to accommodate
> the current subPresenter.
>
>
> Shaping
>