Thanks for your code  Tomasz, it works great!

One  small remark though:in the *getReadyState()*, it should be : 
return 
ReadyState.valueOf(iframe.getElement().getPropertyString("readyState").*
toUppercase()*); 

otherwise ReadyState.valueOf() complains that it cannot find the const 
value ... given that getPropertyString("readyState")  always returns a 
lowercase state value.





Le vendredi 22 juillet 2011 18:29:11 UTC+2, Tomasz Gawel a écrit :
>
> ....and sample usage: 
>
> class UsageExample { 
>         public static void useItLikeThat(){ 
>                 Frame frame = new Frame("
> http://www.example.com/example.pdf";); 
>                 new ReadyStateWatch(frame).addReadyStateChangeHandler( 
>                                 new ValueChangeHandler<ReadyState>() { 
>                         @Override public void 
> onValueChange(ValueChangeEvent<ReadyState> 
> event) { 
>                                 switch(event.getValue()){ 
>                                         case COMPLETE: 
>                                                 Window.alert("I am 
> loaded"); 
>                                                 break; 
>                                         case INTERACTIVE: 
>                                         case LOADING: 
>                                         case UNINITIALIZED: 
>                                 } 
>                         } 
>                 }); 
>         } 
> }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to