Why not. Just run it "later" in a same thread. On Feb 5, 5:55 pm, SergeZ <[email protected]> wrote: > Thanx, the answer is clear, but if JavaScript is a single-threaded, > then how this code can works? > > private void makeATL(final String router) { > Runnable onLoadCallback = new Runnable() { > public void run() { > > //some code > } > > }; > > VisualizationUtils.loadVisualizationApi(onLoadCallback, > AnnotatedTimeLine.PACKAGE); > } > > This code works perfectly in spite of Runnable class using. May be > this is a special issue - I don't understand how it works. Can you > explain it in terms of sigle-thread JavaScript model ? > > On 4 фев, 12:19, mariyan nenchev <[email protected]> wrote: > > > > > Java script is sigle threaded, you can not use threads in the client side of > > gwt project. Just use AcyncCallback. > > > On Thu, Feb 4, 2010 at 2:18 AM, SergeZ <[email protected]> wrote: > > > Hi everybody! I meat the following problem. When my GWT app is > > > started it is very necessary to make an asynchronous call - to gether > > > some data. If i make this call directly from OnModuleLoad() method - > > > then i getting the result, but when I putting the call of my method in > > > a thread: > > > > OnModuleLoad() { > > > ....... > > > > Runnable a = new Rannable() > > > { > > > public void run() > > > { > > > RS.rmiService(new AsyncCallback<String>(){ > > > public void onFailure(Throwable a) > > > { > > > } > > > public void onSuccess(String result) > > > { > > > Window.alert(result); > > > } > > > > } > > > > } > > > }; > > > > ..... > > > } > > > > then I receive NOTHING - there is no any popup window with the result > > > of my Async; > > > > So, what I doing wrong ? May be I just not correctly work with threads > > > in GWT, or may be they are not supported in GWT? Please, help me with > > > your advice - how can I receive the result of my async method from > > > separate thread. > > > > -- > > > 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]<google-web-toolkit%2Bunsubs > > > [email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-web-toolkit?hl=en.
-- 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.
