Nathan,

I think it does not clearly separate out the View and Presenter using
interfaces. This is the reason why I moved away from using menus.
I would prefer if there was a HasMenuItemClicked which returns the
menu item and the presenter would have code like

this.display.getABCMenuItem().addClickHandler() ( new ClickHandler() {
    public void onClick(MenuItemClickEvent event) {
           doAction();
    }
});

I think this is much cleaner...

mic

On Mar 31, 5:05 am, Nathan Wells <nwwe...@gmail.com> wrote:
> I created an "EventFiringCommand" class for instances like this.
> Basically, you put the event bus and the event to fire (or the code to
> generate the event) in the command. The Command should be a presenter-
> layer object, since it has no need to know about the view (and should
> be easy to unit test).
>
> Theoretically, you could just make inner classes in a Presenter for
> each Command you write. It all depends on how you want to organize
> your code and the needs of your specific project.
>
> On Mar 31, 12:07 am,mic<mina...@gmail.com> wrote:
>
> > Just sharing some thoughts....
>
> > Would the MenuItem class need to implement HasClickHandler  so that
> > when a MenuItem is clicked, the action can be handled in the
> > presenter. At this time, the MenuItem needs an object that implements
> > the Command interface, so the view seems to know about the presenter.
>
> > I would like to know what others think about this.
>
> > -mic.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to