well sure, RequestCallback is an interface that has just 2 methods

onError(Request request);
and
onResponseReceived(Request req, Response res);

your inline class implements 2 methods:
onError() and onRequestReceived()
onRequestReceived is not part of the interface, and doesn't really  
belong there. meanwhile, the required onResponseReceived method is  
commented out causing the error that you are seeing.

-jason

On Oct 1, 2008, at 6:31 PM, slow wrote:

>
> Thank you very much all of you. My FPGA has an embedded server so the
> point of origin is not a problem.
>
> Last night I was trying to use the RequestBuilder to make request but
> I ran into problems that I could not solve. I used the code that
> appears on the tutorial. here is the code that has a problem:
>
> try{Request request = builder.sendRequest(null, new RequestCallback()
>    {
>       public void onError(Request request, Throwable exception)
>       {
>               //Unable to connect to server
>               //displayError("Unable to reach server");
>       }
>       public void onRequestReceived(Request request, Response response)
>       {
>               if(response.getStatusCode() == 200)
>               {
>                       //processs data
>                       String recvd_data = response.getText();
>               }else
>               {
>                       //handle error. status text is in 
> response.getStatusText()
>                       String errorText = response.getStatusText();
>               }
>       }
>               /*public void onResponseReceived(Request request, Response 
> response)
> {
>                       // TODO Auto-generated method stub
>
>               }*/
>    });
>
>    }
>
> the problem is on the first line. This is the error I get in eclipse
> and hosted mode console:
>
> [ERROR] Line 34: The type new RequestCallback(){} must implement the
> inherited abstract method RequestCallback.onResponseReceived(Request,
> Response)
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
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=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to