Re: I need a little help with request builder
Yes, i thought to do in that way. But the trouble is that i need to work with 3 files, and i need to execute more than one method over the file contents, so that was that i was wondering some how to make sure that the content was loaded and then work with it. On 16 ago, 14:45, André Moraes wrote: > If i get it correct: > > 1- Your file as a file that your server will serve when you make a GET > request. > 2- You are using RequestBuilder to open a connection to your server and > fetch the file > 3- If all of this is true, you should do: > 3.1 -> create the requestbuilder and point it to your file > 3.2 -> you created your request passing a RequestCallback > (see:http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/g... > ) > 3.3 -> Inside the onResponseReceived of that call, you write the logic to > load and process your file. > > This approach is much more complex but this have the advantage of not > blocking the browser. > > Hope it helps, > > -- > André Moraes > Analista de Desenvolvimento de Sistemas > andr...@gmail.comhttp://andredevchannel.blogspot.com/ -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: I need a little help with request builder
If i get it correct: 1- Your file as a file that your server will serve when you make a GET request. 2- You are using RequestBuilder to open a connection to your server and fetch the file 3- If all of this is true, you should do: 3.1 -> create the requestbuilder and point it to your file 3.2 -> you created your request passing a RequestCallback (see: http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/http/client/RequestCallback.html ) 3.3 -> Inside the onResponseReceived of that call, you write the logic to load and process your file. This approach is much more complex but this have the advantage of not blocking the browser. Hope it helps, -- André Moraes Analista de Desenvolvimento de Sistemas andr...@gmail.com http://andredevchannel.blogspot.com/ -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
I need a little help with request builder
Well, the trouble is not exactly with request builder. The thing is like this. I have a class BinFileReader that in the constructor receives an url an read it address file contents. And the class haves some methods, like readString(), readInt, readByte, etc. But, obviusly, first at all, to execute those methods, i need to have the file readed using RequestBuilder, so when i execute this for example: BinFileReader fileReader = new BinFileReader("/mytext.txt"); String result = fileReader.readString(0, 10); // 0 = from, 10 = to Could happen, and it happens, that the file is not allready readed, and i don't have file contents, so readString method is not usefull. My question, is, how could i build my BinFileReader so i dont have this issue? Do i have to check if the file is readed, if don't put a timer and try again, and over and over again till the file was readed? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.