Reviewers: rdayal,

Description:
DateBox should use ScheduledCommand instead of Command
Resubmission of issue 1695804
Thanks Patrick!


Please review this at http://gwt-code-reviews.appspot.com/1719803/

Affected files:
  M user/src/com/google/gwt/user/datepicker/client/DateBox.java


Index: user/src/com/google/gwt/user/datepicker/client/DateBox.java
===================================================================
--- user/src/com/google/gwt/user/datepicker/client/DateBox.java (revision 10982) +++ user/src/com/google/gwt/user/datepicker/client/DateBox.java (working copy)
@@ -17,6 +17,8 @@
 package com.google.gwt.user.datepicker.client;

 import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.editor.client.IsEditor;
 import com.google.gwt.editor.client.LeafValueEditor;
 import com.google.gwt.editor.client.adapters.TakesValueEditor;
@@ -35,8 +37,6 @@
 import com.google.gwt.event.logical.shared.ValueChangeHandler;
 import com.google.gwt.event.shared.HandlerRegistration;
 import com.google.gwt.i18n.client.DateTimeFormat;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.HasValue;
 import com.google.gwt.user.client.ui.PopupPanel;
@@ -490,7 +490,7 @@

   private void preventDatePickerPopup() {
     allowDPShow = false;
-    DeferredCommand.addCommand(new Command() {
+    Scheduler.get().scheduleDeferred(new ScheduledCommand() {
       public void execute() {
         allowDPShow = true;
       }


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to