CardContainer and Presenter extension suggestion

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

CardContainer and Presenter extension suggestion

Sebastián Sastre
Hi there,

 I found useful to modify the CardContainer to this:

AbstractCardContainer>>onCurrentCardChanged
        "Private - The current card has been changed in the layout manager.
        Trigger our own card change event."

        self currentCard presenter onSelectedAsCard.

        self trigger: #currentCardChanged

also...

Presenter>>onSelectedAsCard
        "The receiver has been selected as a card in some kind of
cardPresenter."

and...

View>>onSelectedAsCard
        "The receiver has been selected as a card in some kind of
cardPresenter."

so it sends #onSelectedAsCard to the presenter (or the view) that is
getting browsed. The default #onSelectedAsCard by default does nothing,
but if you need, you can use it for certain specific tasks as a refresh
that should be done each time it is showed to the user or lazy
calculations.

   regards,

Sebastian