AsyncCallback<Void> should work.

Pay attention though that you do need to call it with a valid Void object, 
for which null is appropriate. Not the clearest API, but it works.

void fn(final AsyncCallback<Void> callback) {
  callback.onSuccess(null);
}

On Wednesday, August 6, 2008 5:05:27 AM UTC-4, Patrick Ratelband wrote:
>
> I have tried and I am afraid that I cannot get it to work either. It 
> really seems like you have to return something, and you have to type 
> it, otherwise the GWT compiler will generalize the callback to handle 
> anything and your code will bloat. Too bad, maybe an idea for the next 
> GWT release? 
>
> Patrick 
>
> On Aug 5, 2:03 pm, thlaitina <thlait...@gmail.com> wrote: 
> > hi Patrick, 
> > 
> > Did you try? I got "Unable to recognize 'java.lang.Void 
> > java.lang.Void' as a type name (is it fully qualified?)" when I put 
> > Void as the return type! 
> > 
> > Tina 
> > 
> > On Aug 3, 3:01 pm, Patrick Ratelband <ratelb...@gmail.com> wrote: 
> > 
> > > Thank you Daniel, 
> > 
> > > I never thought of usingvoidwith a capital V (silly me... slaps 
> > > himself), even though it might not be very... well... clean code, at 
> > > least it makes Eclipse happy for the moment. 
> > 
> > > Patrick 
> > 
> > > DanielK wrote: 
> > > > My workaround to this was to use the class "Void" as the type 
> > > > parameter of asynccallback / the return value of the method. 
> > 
> > > > I dont know if this is a good thing, though. Only Joshua Bloch or 
> Bob 
> > > > Lee could answer that.

-- 
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 google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to