callback

Access Violation Exception/Crash from C++ callback to C# function.

So I have a native 3rd party C++ code base I am working with (.lib and .hpp files) that I used to build a wrapper in C++/CLI for eventual use in C#. I've run into a particular problem when switching from Debug to Release mode, in that I get an Access Violation Exception when a callback's code returns. The code from the original hpp...

Server control losing mousedown event handler on callback

I have a composite server control that contains a div to which I attach a right click event handler in the Render method (simplified for clarity): protected override void Render(HtmlTextWriter writer) { base.Render(writer); writer.write(@" <script type=""text/javascript""> document.getElementById(""myDiv"").onmousedown ...

How might I gain write access to outer objects from a jQuery AJAX callback method?

Your help would be very much appreciated. I do not understand why the following jQuery code does not work: function saveChanges(obj, n, id) { var t = "content to send to server"; $.post("http://localhost:8080/Content.do?method=update",{ value: t, key: id },function(result){ alert(result); //WORKS alert("INNER"+$(...

Detecting Client Death in WCF Duplex Contracts.

I'm trying to build a SOA where clients can perform long running queries on the server and the server responds using a callback. I'd like to be able to detect if the client disconnects (through user initiated shutdown, unhandled exception or loss of network connectivity) so that the server can choose to cancel the expensive request. I...

Returning database view data using wcf service and binding results in WPF

Hello, Here's what I want to achieve: Have a wpf system tray application or a vista gadget that will show me live data from a database view. I need to use a WCF service to retrieve the data. The data in the underlying tables will be changing frequently but I can do without upto the second updates in the client (if I have to). How do y...

Preventing callback during validation in ComponentArt grid

I have to validate a couple of fields in the CA grid every time a record is updated/added. The grid is used in the callback mode. What i cannot figure out how to do is cancel the callback if a cell is invalid. I am trying to do this 'onBeforeUpdate' event of the grid. I can call set_cancel(true) to cancel the update. But this will change...

Odd WCF problem

I have a server-client using WCF. The server has a list of clients. To check for timeouts, every minute it sends a bit of data (ping) to each client. All sending is done asynchronously - so the line looks like this: for (int i = 0; i < MaxUsers; i++) { if (_clients[i] != null) { _clients[i].Client.BeginSendToClient("PI...

FancyBox Callback Keydown

I have been working on this code, and I can't seem to figure it out. Fancybox's callbacks don't seem to work at all. I have the keyboard bound to the pagination for this gallery. But I want to unbind the keyboard from the table when fancybox opens. When fancybox opens nothing changes.... What to do?? $(document).ready(function() { $('...

"Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call" after successful C# callback from the C++ code of GameSpy lib.

I'm making a C# application which is using GameSpy C code (the GP part). The C code is calling a callback (which is C# code) succesfully, but I get this error "Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call" right after the callback is done. I've made a DLL out of C code, BTW like this: /...

ExtJS grid callback on load and reload

Hello. I have an Ext Grid and want to grab the JSON "success":false/true response an execute a function for each situation. I would like to have it as callback function for every grid interaction with the JSON PHP file. Any examples of this ? Thank you for your time. ...

C# Winforms Begin/EndInvoke and IAsyncResult

Can anyone give me an example scenario where Asynchronous Callback should be used in an Winforms Database application? And also an example scenario where Asynchronous Callback must be used in an Winforms database application? ...

How to configure dojox.cometd for callback-polling?

So far I found some examples on how to configure dojox.cometd, but none of them configure the connectionType. I am currently more interested in callback-polling instead of the long-polling (that is the default one, as far as I know). Somebody can help me here? I must admit that the dojox documentation is quite obscure for me, and even t...

How to implement callbacks in Java

Hi, I have a class called CommunicationManager which is responsible for communication with server. It includes methods login() and onLoginResponse(). In case of user login the method login() has to be called and when the server responds the method onLoginResponse() is executed. What I want to do is to bind actions with user interface....

WCF callback interface passing to another WCF service method on different machine

Hi, I received callback interface from machine A and stored it on machine B. I'd like to pass this callback interface (that is a proxy on machine B) to machine C. Machines A, B and C uses WCF so proper interfaces are available. The issue is when I run PassCallbackToDedicatedMachine(someCallback) method I receive exception like below...

jQuery: Made json request, process it in callback, access it outside the callback function?

$("select[name=field[]]").live("change", function() { $.getJSON("/json.php",{id: $(this).val(), ajax: 'true'}, function(j){ options = ''; for (var i = 0; i < j.length; i++) { options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; } }); ...

How can ruby provide a callback when a file is closed?

I have a method which returns an File object. I need to know when the file is getting closed. This is not as simple as overwriting the close method. The close method is not called if the file is closed by the destructor. It should work like this: def something get_lock_on_file file File.new("foobar") file.on_close { release...

WCF - Callback and/or Event

How can I receive a message from one client and Callback to all Clients connected to the Host to send that message? ...

Calling a Flex/AS3 Callback from Javascript

Hi, I have a Javascript API, which should be usable with GWT and Flex. Using the FABridge it is really easy to call Javascript methods from AS3 and vice versa. But when I try to register a callback to an AS3 method in my Javascript API I get stuck. Here is a short code sample: public function initApp():void { if (ExternalInterface.a...

c++ need help on how to use callback functions

The function header is defined below: /** * \fn int fx_add_buddylist(const char* name, EventListener func, void *args) * \brief rename the group. * * \param name The group name which you want to add. * \param func The send sms operate's callback function's address, and the operate result will pass to this function. * \par...

Using PHP filter functions like filter_var_array() is there a way to check if length of an input string is less than some value

I have been toying with PHP filter library. I liked it but I am unable to perform a simple filter function. I essentially want to invalidate those values in my input array that are strings and which are longer than certain value. Is there a way to do this like, $data = array('input_string_array' => array('aaa', 'abaa', 'abaca')); $args...