Hi,

I am just getting started on GWT and one of the things that strikes me
is the amount of error prone black magic involved in creating an Async
interface.  Sure tools can help you keep it in sync with your Service
interface but something seems wrong with it.

This may be naive but I was wondering if something like the new
GWT.runAsync might be useful here?  You could completely remove the
need for the Async interface with code like this:

GWT.runAsync(new Runnable()
{
    public void run()
    {
        try
        {
            StockPrice[] prices = stockPriceSvc.getPrices
(stocks.toArray(new String[0]));
            usePrices(prices);
        }
        catch (RemoteException re)
        {
            Window.alert("oops");
        }
});

The stockPriceSvc would implement StockPriceService rather than
StockPriceServiceAsync.  You also would not need the onFailure and
onSuccess

I imagine I am overlooking something!

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

Reply via email to