my english is very poor,but i try my best to understand your post. i can not understand why don't you fire the events in widget,and why the information that we need to compute if the time outside a range must be transfered via eventbus?
On Dec 9, 8:56 pm, Jens <[email protected]> wrote: > For example you could have a class that is responsible to show a message in > your UI when it detects a long running task. Now this class needs the > information when a tasks starts, when it stops and maybe it would also like > to display a message depending on the task itself. > > As these tasks could be started everywhere in your app you would use the > EventBus to transport these information to your class that should show the > message if the task takes too long. So you would have a > TaskStartEvent(String taskMessage), TaskFinishedEvent() and you would fire > these events in presenters/controllers and not inside widgets. Thats an > example where you use the EventBus directly with custom events outside of > widgets. > > And the map you have mentioned is not too complex. It has this structure > because the EventBus supports handlers for specific event sources (which is > the Object key in the map), see EventBus.fireFromSource() and > EventBus.addHandlerToSource(). > > -- J. -- 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.
