Hi,
I'm trying to understand the DeferredCommand.addPause function (with
gwt-2-ms1).
I wrote this sample :
Button bouton = new Button("attente");
bouton.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent event) {
DeferredCommand.addCommand(new Command(){
@Override
public void execute() {
GWT.log("Deferred command 1", null);
}
});
DeferredCommand.addPause();
DeferredCommand.addCommand(new Command(){
@Override
public void execute() {
GWT.log("Deferred command 2", null);
}
});
GWT.log("Event ends", null);
}
});
RootPanel.get("sendButtonContainer").add(bouton);
In my mind, the pause added between the two deferred command would stop
executing the queue until another event is handled. Then, a log like that
should be :
{First clic on button}
[INFO] Event ends
[INFO] Deferred command 1
{second clic and next ones}
[INFO] Event ends
[INFO] Deferred command 2
[INFO] Deferred command 1
but I get this log :
[INFO] Event ends
[INFO] Deferred command 1
[INFO] Deferred command 2
So, I haven't understand exactly what is a pause. Could somebody explain me
where I'm wrong ?
Thank you.
--
Damien Picard
Open Source BPM : http://code.google.com/p/osbpm
--
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=.