found a View as presenter?

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

found a View as presenter?

rush
Hi,

I am trying to create a presenter and layout manager for TabbedList, a
basically something like Video Library example, but smart enough to resize
the tab with tape names to the needed size, and give rest to the presenter
of the selected tape.

I think I have finnaly found a way to make it work, but in order to do so, I
needed to call from layout manager some methods from presenter, more or less
to find out the space that tab control actually needs. I have added correct
implementation to the TabbedListPresenter, and dummy one into the general
Presenter class, just in case someone drops the TabbedLayoutManager together
with some other presenter. Not very nice I can agree, but win tab control is
no beauty either, and the whole kudge seems to produce desired result.

The problems start when I try to edit a view that has TabbedViewLayout in
the view composer, and the thig breaks when layout manager tries to access
the new methods in presenter. It turns out that when this walkback occurs,
the presenter of the view is not an (sub)instance of the Presenter, but an
instnace of the View! Is this normal to happen in some stage for view
composer? If yes what could also appear as presenter, and ho to deal with
it? Alternatively is my image in some bad shape?

Thanks for help,

rush
--
http://www.templatetamer.com/


Reply | Threaded
Open this post in threaded view
|

Re: found a View as presenter?

rush
"rush" <[hidden email]> wrote in message
news:bggv2f$4ar$[hidden email]...
> I am trying to create a presenter and layout manager for TabbedList, a
> basically something like Video Library example, but smart enough to resize
> the tab with tape names to the needed size, and give rest to the presenter
> of the selected tape.

hmm.. on the second thought maybe it would be much better to strip this
functionality out of presenter, and use arrangements for subviews:
#tabs
#item

to find each view and do all work in layout manager.

Funny how saying something aloud (or posting to newsgroup) can make you see
a different angle :)

rush
--
http://www.templatetamer.com/


Reply | Threaded
Open this post in threaded view
|

Re: found a View as presenter?

rush
> hmm.. on the second thought maybe it would be much better to strip this
> functionality out of presenter, and use arrangements for subviews:
> #tabs
> #item

yap this did the trick and is much cleaner now. Thanks for the listening ;)

rush
--
http://www.templatetamer.com/