I guess my questions are the following:
1. Can/should the view hold a reference to the eventbus, or can the application controller offer a static getter for the eventbus that the view can use to fire events on it?
2. Is there another way of handling this behavior that doesn't use the eventbus, such as a scheme for adding all the previously added widgets as handlers for the new widgets? This question makes me think that the eventbus really is the way to handle this.
3. One of my ideas included holding a reference to the eventbus in the custom event class as a static field, This way, a register static method could set the event bus and a fire static method could fire the event on the eventbus without any other classes needing to know about it. This seems like it's complicating the event too much, though.
Any thoughts?
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment