On Mon, Mar 12, 2012 at 10:49 PM, <[email protected]> wrote:
> That is just it, they aren't running Synchronous (unless I am getting it > backwards). > If you run things synchronously, there is no callback. Does that answer your question? You'd just set sync mode and call your methods in sequence. > I want to send a request to a CFC and then wait for my answer, and then > continue my processing. > Which is what sync mode is for. > In the code case, I send my request, via getUser(id), which calls the > function that fires the CFC and then the return is captured. Back when I > was using CFCAjax it was waiting for the return, now that I moved to > CFAJAXPROXY it is not waiting, no matter what I set (setAsyncMode or > setSyncMode) > > and to quote the site: > > setSyncMode - Sets the mode of network operation to be synchronized. This > means the page will wait until the server responds with the result > Well first of all, don't compare anything you're doing now with CFCAjax. But as I said before, using sync mode and using a callback method are mutually exclusive. Check the examples here: http://www.openbd.org/manual/?/tag/CFAJAXPROXY If you want to call a method, get the response, then call another method, you'd just do: foo.setSyncMode(); foo.method1(); foo.method2(); In that case method1 and method2 would run in sequence since it wouldn't proceed with method2 until method1 finished. You'd only use a callback method if you wanted the page to NOT wait for the response from the server, and the callback method would be called *whenever the response comes* as opposed to your page waiting for a response. -- Matthew Woodward [email protected] http://blog.mattwoodward.com identi.ca / Twitter: @mpwoodward Please do not send me proprietary file formats such as Word, PowerPoint, etc. as attachments. http://www.gnu.org/philosophy/no-word-attachments.html -- online documentation: http://openbd.org/manual/ google+ hints/tips: https://plus.google.com/115990347459711259462 http://groups.google.com/group/openbd?hl=en
