PeteGashek / puzzlebazar

Automatically exported from code.google.com/p/puzzlebazar
0 stars 0 forks source link

Automate revealChildren, notifyHideChildren, setContent methods. #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The current design puts the burden of writing the revealChildren() and 
notifyHideChildren() on the user who writes his Presenter class. Moreover, 
users have to write a lot of sensitive boilerplate in the setContent 
methods. For example:

public void setMainContent(Presenter content) {
  if (mainContentPresenter != content) {
    if (mainContentPresenter != null)
      mainContentPresenter.notifyHide();
    mainContentPresenter = content;
    view.setMainContent(content.getWidget());
  }
}

Instead of that, the Presenter class should offer an automatic slot 
registration mechanism that can take care of all these methods.

Original issue reported on code.google.com by philippe.beaudoin on 21 Mar 2010 at 12:32

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 22 Mar 2010 at 12:53