callback

implementing callback between Python and C

I have wrapped some C code using SWIG to use it as a python library. Within this framework, some python code I have written calls a C function, which returns a string. However, for creating the string, the C function requires a ranking, the generation of which I have implemented in Python. How would I go about implementing this using ca...

Unable to use "class" methods for callbacks in JavaScript

I'm having a really rough time wrapping my head around prototypes in JavaScript. Previously I had trouble calling something like this: o = new MyClass(); setTimeout(o.method, 500); and I was told I could fix it by using: setTimeout(function() { o.method(); }, 500); And this works. I'm now having a different problem, and I thought ...

Identify callback control id

I have a masterpage that contains a user control. The usercontrol uses callbacks for various operations. However, every time a callback is issued from the user control it is propagated down to the pages that inherit from the master page. How do I determine the id of the control that issued the callback so that I can stop these callbac...

cakephp behavior afterFind not called on related models

I am using an afterFind function to modify data from a find function. It works fine. If I move the afterFind function into a behavior (in a plugin) it still works, but only when the model of interest is the primary model, i.e. it isn't called when the model belongsTo another model. Is there any way round this? I'm using cake 1.3.4. This ...

[PHP] PayPal Payment Callback

I have searched for more than 4 hours now on how to do callback with PayPal after a payment have been proceeded. The thing is, I have a site the sells tickets to a LAN Party, and the only way to pay is with PayPal. Here is my PayPal buy button code: <form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="po...

jQuery: Chaining functions that callback themselves?

Hi folks, I have a javascript function that calls itself on callback, and I'm wondering how to chain other functions after all callbacks are finished? Perhaps best explained by code: $(document).ready(function() { sequentialFadeIn($('#demolist li')); }); function sequentialFadeIn(item) { item.eq(0).fadeIn("fast", function() { ...

Is it possible to get an asp.net 'OnClicked' callback in javascript to call a function in a web control?

Title says it all, it does seem like it wouldn't be possible since callback functions seem to be page specific but in case it's possible I'd like to do that. ...

What is better for the parameters of a C callback function: va_list, or ellipsis?

My library offers a callback point where my library users can register to get information. The general form of the callback is an int followed by various parameters whose type depend on the int value. Therefore, I defined the callback type and the function to set it as follows. typedef void (* callback_func_t)(int type, ...); void set_c...

Call backs in Java (code explanation)

Hello, I came across this question about callbacks in Java. Hers is the running code and original answer here. But I didn't understand how is it useful for callback? Can you explain the concept of callback to a Java programmer? Code: public class Main { public interface Visitor{ int DoJob(int a, int b); } ...

How to handle callbacks in asp.net ?

Are there different callbacks available in aps.net like rails provide before_validation, before_update, before_save and before_destroy ? How to handle this scenarios in aps.net ? ...

Detecting callback timeout

I have a ScriptControl which does a Callback to my page. Success and error responses from the server work fine and go to my client handler functions. However, if I stop the web server, then the request can't go through (should time out), but no client functions are ever called. I'm defining my handler functions through Page.ClientScri...

Callback and Functions with jquery..

Hi everybody... I have already asked a question but I wanted to ask it in another way with another question. Is that possible call a method 10 times in asynchronous mode without specifying a return value. I am doing everything in a single page. I do not need to visit any other page. I have got a set of operation, each operation should w...

Is it possible to overload Async Callbacks in GWT?

Hello, I have an overloaded query method on the server side. I wanted to know if I can overload the async callback, depending upon the method signature? Or is it advised to define two different asyncallbacks? These are my two methods o the server. public String fetchInADay(String startTime, String endTime) {} public String fetchInADay(...

problem with callback function in javascript using extjs

My callback code (js file) is something like function addcontent(Title, tUrl, bURL, Id,purl){ alert(Id) var runcontent = new Ext.Panel({ id: 'tt' + Id, region: 'center', autoLoad: { url: tUrl, callback: function(el){ addwindow(el, Id, bURL,purl); }, scripts: true, nocache: true...

how to avoid that callback is sent to deallocated instance

The following process leads to a crash of my app: the user opens a view and a request is send to the server the request is executed in background the user navigates back to the root view the request has been finished and the following code is executed // MyDatasource.m // e.g. in connectionDidFinishLoading [callback loaded...

Add a callback function to a Ruby array to do something when an element is added

I'd like to add something like a callback function to a Ruby array, so that when elements are added to that array, this function is called. One thing I can think of is to override all methods (like <<, =, insert, ...) and call that callback from there. Is there an easier solution? ...