Maybe I've misguided you mentioning the SimpleEventBus implementation of
the EventBus interface. The actual question was whether I should use a
*static* EventBus that can be defined in a "Common" class and reference
this static EventBus from any other view.

E.g. using

*MyView() {*
*    // MyView Constructor*
*}*
*
*
*Common.myEventBus.fireEvent(new MyEvent()); // the _static_ way*

VS.

*MyView(final EventBus myEventBus) {*
*    this.myEventBus = myEventBus;*
*    // The rest of MyView Constructor*
*}*
*
*
*myEventBus.fireEvent(new MyEvent()); // the _non-static_ way*

On Mon, Nov 7, 2011 at 12:15 PM, Thomas Broyer <[email protected]> wrote:

> Injecting an EventBus allows you to pass the one instance you want
> (SimpleEventBus, ResettableEventBus, CountingEventBus, RecordingEventBus,
> or your own subtype), and change that between dev, production, and tests.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/x7AlvB4OuZkJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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

Reply via email to