Isn't the event bus just an implementation of the Observer pattern?

On Wed, Dec 16, 2009 at 1:12 AM, Grant <[email protected]> wrote:
> What you probably want is an Event Bus.
>
> There is a great video available, google for 'gwt mvp'. It is well
> worth a watch
>
> Grant
>
>
>
> On Dec 16, 7:01 am, jax <[email protected]> wrote:
>> HI
>>
>> I have a questions about communication in GWT and java in general.
>>
>> In an effort to better modularize my application I have made a number
>> of different composites.  I then have a main application that links
>> together all the composites.
>>
>> The problem comes when I need to communicate between composites, for
>> example change an image in a composite based on an event in another
>> composite.
>>
>> They way I have don this now is by passing "this" to every composite
>> constructor and saving it as parent.  I also have methods that allow
>> me to get the children of a composite.  Then in each composite I have
>> a getCompositeParent() method that will allow me to go further down
>> the composite tree.
>>
>> For example:
>>
>> parent.getCompositeParent().getCompositeParent().getNamesComposite
>> ().getName().setText("hello");
>>
>> This seems a bit unwieldy.  Is this the normal way of doing things in
>> JAVA?
>
> --
>
> 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.
>
>
>

--

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