On Aug 18, 1:48 pm, Nathan <nathan.shel...@gmail.com> wrote:
> Hey GWT peoples,
>
>   In Ray's GWT talk, he suggests using the Event Bus pattern in GWT
> applications, to keep things clean.  Does anyone have suggestions on
> how to approach this?

I've discovered that Ray Ryan actually left very little unspoken in
his presentation, and that one really just needs to watch it enough
times to pick up on some very important sentences that go by
quickly.   In the case of your particular question, here is what he
said:

"We're going to use a GWT class to actually instantiate our event bus
because that's simpler than writing our own.  With GWT 1.6 we re-
vamped our event handling  mechanism, and at the heart of each one of
our widgets is a handy class called a HandlerManager.  There's no
reason you can't use your own instance of HandlerManager to provide
your app-wide event-dispatch services."

In our case, we wrote an EventBus class that is a simple decorator for
HandlerManager, which does all the real work.  The only reason we
wanted to write our wrapper are:  1)  We wanted a central place to log
all the events that get dispatched, and 2)  We needed a no-argument
constructor to let GIN instantiate my EventBus automagically.




--~--~---------~--~----~------------~-------~--~----~
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-toolkit@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