Okay it is so simple as i thought.
Define the CallBack in the Main and give them the method.
Greetings
garden
On 22 Okt., 12:04, garden <[EMAIL PROTECTED]> wrote:
> Hello everybody
> I've a little problem, and I think I have a big Fallacies.
>
> I have my main class, let's call it main
> and I have a database class wich I use to communicate with the server.
>
> Now I make in the main class a database
> and call the method to get content.
>
> MAIN
> String response = database.getContent();
>
> DATABASE
> final String temp;
>
> public String getContent()
> {
> rB_requester.sendRequest(null,
> new RequestCallback() {
> public void
> onResponseReceived(Request request, Response
> response) {
> temp = response.getText();
> }
>
> public void onError(Request request, Throwable
> exception) {
> temp = exception.getMessage();
> }
> });
>
> return temp;
>
> }
>
> The problem is that the temp String is empty, but the responseText is
> okay.
> How can I return data from the onResponseReceived - Method to the
> getContent - Method ?
>
> I think there is a very easy way, but I didn't see them. :(
>
> sorry for my terrible english
> Greatings - garden
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---