PeteGashek / puzzlebazar

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

Consider creating PresenterWiget's notifyReveal() #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Right now, there is a lot of confusion between the concept of "revealing" a 
presenter and "notifying a presenter that it has been revealed". There should 
be a way to clean-up these two concepts. Probably have "reveal()" only in 
Presenter (not in PresenterWidget) and a new notifyReveal() method in 
PresenterWidget.

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

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 23 Mar 2010 at 5:22

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 23 Mar 2010 at 5:28

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 23 Mar 2010 at 5:29

GoogleCodeExporter commented 9 years ago
This has been radically simplified. No more notifyHide and notifyReveal. The 
logic 
was cleaned so that onReveal and onHide are called exactly once on presenters 
when 
they are revealed or hidden, and this is validated through an assert() in 
PresenterWidget#onReveal and #onHide. Failing this assert probably means the 
user 
failed to call super.onReveal() or super.onHide(). onReveal is called so that 
parents are made visible before their child. onHide is called so that child are 
made 
invisible before their parent.

The reveal() method is now only available only on a Presenter. It will defer 
the 
call to the proxy, so that everything is validated by the Place (i.e. 
canReveal() is 
checked). There is a new forceReveal() which is used by a proxy that wants its 
presenter to reveal itself. It should typically not be called by the user, 
although 
doint so probably wouldn't fail, it would just bypass the canReveal() 
validation.

The last little nasty bit left is in ProxyPlaceAbstract#handleRequest and it 
should 
be addressed with Issue 73.

Original comment by philippe.beaudoin on 25 Mar 2010 at 5:27

GoogleCodeExporter commented 9 years ago
Moved to GWTP:
http://code.google.com/p/gwt-platform/issues/detail?id=16

Original comment by philippe.beaudoin on 27 Mar 2010 at 6:13