Thanks for your response and sorry for the late reply:

While I'm aware that the best thing to do from a design perspective
would be to rewrite the calls so they are handled asynchronously, we
probably will not do that in the short run because the application is
simply too complex (3 years, dozens of developers, several thousand
LOC) and we would probably end up having to rewrite a lot of code in a
lot of different places.

However, what should work for us in the short run is enabling Cross-
Origin Resource Sharing (cf. http://www.w3.org/TR/access-control/) so
our web server answers cross-domain XHR correctly (works in FF3,
Chrome, Safari 4). Pretty neat.

-Martin

On Dec 17, 5:20 pm, David Nesting <[email protected]> wrote:
> On Tue, Dec 15, 2009 at 9:50 AM, Martin Kreichgauer <
>
> [email protected]> wrote:
> > that this is not particularly good design, but rewriting the client
> > code in a way that the requests are performed asynchronously is
> > currently not an option. :-/ Is there any way to make
>
> I'm not aware of a way to make that method synchronous.  Adapting the code
> to work asynchronously (which usually is pretty easy) seems to me to be the
> clear and correct thing to do here.  If this isn't an option because you're
> not sure how best to approach it, let us know where you're stuck and someone
> can suggest a solution for you.
>
> function example() {
>   var x = someFunction();
>   var result = neededSynchronousFunction();  // this is what you need to
> work
>   doSomethingElse(x, result);
>
> }
>
> function example2() {
>   var x = someFunction();
>   asynchronousFunction(function(result) {
>     doSomethingElse(x, result);
>   });
>
> }
>
> David

--

You received this message because you are subscribed to the Google Groups 
"Google Wave API" 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-wave-api?hl=en.


Reply via email to