synchronous

Synchronous dialogs in Flex?

How can I open a synchronous dialog in Flex? I need to call a function from an External Interface (JavaScript) that will open a simple dialog in the Flex application and returns an value according to the button the user has clicked (OK/Cancel). So it should by a synchronous call to a dialog, i.e. the call waits until the user has closed...

Is there an equivalent technique in Cocoa for the synchronous TrackPopupMenu in Windows?

In response to a rightMouse event I want to call a function that displays a context menu, runs it, and responds to the selected menu item. In Windows I can use TrackPopupMenu with the TPM_RETURNCMD flag. What is the easiest way to implement this in Cocoa? It seems NSMenu:popUpContextMenu wants to post an event to the specified NSView....

Wrapping an asynchronous method synchronously in C#

I have a third party library containing a class which performs a function asynchronously. The class inherits from the Form. The function basically performs a calculation based on data stored in a database. Once it has finished, it calls a _Complete event in the calling form. What I would like to do is call the function synchronously but...

How to call web service using vbscript (synchronous) ?

Actually there many examples and I have used one of them. But it works asynchronous, I mean it is not waiting the function that I called to finish. function ProcessSend() Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP.4.0") Set oXMLDoc = CreateObject("MSXML2.DOMDocument") oXMLHTTP.onreadystatechange = getRef("HandleStateChang...

Ajax synchronous callbacks

Hi All, I have a pageTest.html in local folder,this page call a service.ashx?i=...(that return value param passed incremented +1) with follow Ajax code: . . getIncr: function(parameters, success){ $.ajax({ async: false, type: methodType, url: getTarget, data: "n="+parameters, ...

Flex 3: synchronously loading an xml file

My question is very simple: In flex3, is there a way to load an xml file synchronously? I know how to load asynchronously, using a load event. This may be useful, or may not. I just want to read the file, parse it, do what I have to do with it, and continue executing code. I have a component that uses an xml file to store some configu...

How I can implement sync calls to WCF services in SIlverlight?

Hi! Sometimes I need to call WCF service in Silverlight and block UI until it returns. Sure I can do it in three steps: Setup handlers and block UI Call service Unblock UI when everything is done. However, I'd like to add DoSomethingSync method to service client class and just call it whenever I need. Is it possible? Has anyone re...

How to guarantee a function will not be entered again if it does not return within a thread?

I don't want the function to be entered simultaneously by multiple threads, neither do I want it to be entered again when it has not returned yet. Is there any approach to achieve my goal? Thank you very much! ...

TSQL make EXECUTE statement synchronous

I have two TSQL EXEC statements EXECUTE (N'MyDynamicallyGeneratedStoredProcedure') -- return 0 on success SELECT @errCode = @@ERROR ; IF (@errCode = 0) BEGIN EXEC 'A Sql Statement using ##temptable created from first', @returnValue END How do I make the two EXEC's synchronous? ; Right now the second EXEC does not wait for the first...

Asynchronous Vs. Synchronous Execution, What does it really mean?

Asynchronous Vs. Synchronous Execution, What does it really mean? ...

Synchronous GET request with YUI 2.7?

hi, i'm relatively new to YUI - browsing their great docs, i do not find a method or a flag to load an external resource synchronously. or the question the other way around; for each matched node i need to call a method, which inserts something at the node; with asynchronous calls the remembered identifiers seem to mess up. therefore...

Updating UIAlertView title

I am uploading a bunch of files from the iPhone to a web service. I want to have a UIAlertView on screen with a UIActivityIndicatorView inside. I got that to work fine. However, I want to update the title of the UIAlertView as each file gets uploaded. ("Uploading file 1...", "Uploading file 2...", etc.) I know that you can't just se...

Javascript - synchronizing after asynchronous calls

Hello, I have a Javascript object that requires 2 calls out to an external server to build its contents and do anything meaningful. The object is built such that instantiating an instance of it will automatically make these 2 calls. The 2 calls share a common callback function that operates on the returned data and then calls another ...

How to cleanly get user input from the middle of model's method in Model-View-Viewmodel architecture?

Hi everyone, I am writing an app that listens on a network connection, and when some data arrive, it replies back, and depending on incoming data, it may need to ask user (show dialog) before replying back. I don't know how to do this cleanly in M-V-VM architecture: the events and binding to observable collections are nice if I need to ...

Implementing Synchronous network call in java waiting for an ack message?

How would you go about implementing the equivellent of a wait until complete method call in Java? Basically what I want to do is hava a method that sends a message over the network to a server application and waits till it gets the appropriate Ack message from the server with either an operation completed successfully or operation faile...

synchronous jquery json request

I need to make a synchronous request to the last.fm API, but when I use GET and json together, the request becomes asynchronous. my code: $.ajax({ async: false, dataType: "json", url: "http://ws.audioscrobbler.com/2.0/?method=artist.getimages&artist="+artist+"&api_key="+apiKey+"&format=json&callback=?", succ...

Synchro boost example problem

Dear everybody, I have a problem using asio. My client/server application requires only synchronous communication. So, using the examples for synchro from the boost homepage, I have set up two procedures to send and receive data. Their code is as follows: void vReceive(tcp::socket & socket, std::string & szDest){ char szTmp_Buf [BUF...

If MessageBox()/related are synchronous, why doesn't my message loop freeze?

Why is it that if I call a seemingly synchronous Windows function like MessageBox() inside of my message loop, the loop itself doesn't freeze as if I called Sleep() (or a similar function) instead? To illustrate my point, take the following skeletal WndProc: int counter = 0; LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, ...

How do I ensure a Flex dataProvider processes the data synchronously?

I am using an component, and currently have a dataProvider working that is an ArrayCollection (have a separate question about how to make this an XML file... but I digress). Variable declaration looks like this: [Bindable] private var _dpImageList : ArrayCollection = new ArrayCollection([ {"location" : "path/to/image1.jpg"}, {...

Asynchronous vs synchronous messagin

Hi, What is difference between Asynchronous vs synchronous messaging (java) and how does it impact way in which messaging sender / receiver is implemented. how does a J2EE architecture decides to choose either. ...