Try this:

// Add a handler to close the DialogBox
closeButton.addClickHandler(new ClickHandler() {
   public void onClick(ClickEvent event) {
      dialogBox.hide();
      sendButton.setEnabled(true);
      DeferredCommand.addCommand(new Command() {
         @Override
         public void execute() {
            nameField.setFocus(true);
         }
      });
   }
});

That should execute setFocus after after all currently pending event
handlers have completed.
--~--~---------~--~----~------------~-------~--~----~
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