I have found that scheduling a deferred event can be at times an 
anti-pattern. For example, let's say I've got a bunch of UI elements 
getting initialized. I had in the past used a deferred command to finish 
the UI init once everything is there. In this case there would be errors 
that occurred 5% of time when a user was on a stressed browser/old client 
and the event was returned before all init tasks were complete.

The better way to deal with this I've found is the EventBus and latches. 
Let's say I needed 10 things setup before the UI can continue, then those 
10 things will throw an event to that latch listener and once all 10 are 
complete, it fires an event to carry on now at the UI is ready. Perhaps 
this is applicable to your case.

Hope that helps.


Sincerely,
Joseph

-- 
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/-/PSsoL5Io8IcJ.
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