callback

In functionally programmed javascript, is there any penalty to returning a callback rather than just calling a callback?

I do this out of habit: function process( fn ){ // Some process that builds data return fn( data ); } It is not always necessary to return the callback, and I would like to know if there is any performance hit in doing that over simply calling the callback: function process( fn ){ // Some process that builds data fn( dat...

problem with callback function in javascript

Hi, I am trying to understand callback functions in javascript. There is a function something like function load() { var func = function(data){ /// }; } Can anyone explain me from where the parameter "data" will be returned, as I dont see any variable declared in the file. ...

How to react in ASP.NET code-behind class when a hyperlink is clicked inside the page's IFrame?

Hi Guys, I have an ASP.Net page containing an IFrame. In the IFrame I load a html document. When the user clicks on a hyperlink in the content of the IFrame, I would need a callback to be called in the code-behind class of the ASP.Net page. I guess that I need Ajax to do this but I'm not exactly sure about what I need to do. Could you ...

How do you specify the channel .NET remoting will use to perform a callback

I have a client (and server) with 2 channels set up on different protocols, lets say X:// and Y://. If I call a service (over remoting) from client (C) on a server (S) that needs to perform a callback to the client (so S->C) is there a way to specify which channel to use? In my use case I want any calls from X:// to callback over X:// ...

Overriding Javascript Confirm() while preserving the callback

Hello all! To the point, I want to override the standard js confirm() function within a jQuery plugin. I have figured out how to do it with the simple function layout below. function confirm(opts) { //code } Now, what I want to do is call another function within the confirm function above, like so... function confirm(opts) { op...

DevExpress ASPxGridView callbacks and jQuery

Hi, we have a DevExpress ASPxGridView in our webapp with EnableCallbacks=true to allow client side events for this grid. As soon as we include jQuery (1.4.1 or 1.4.2) and perform eg. a filtering on the ASPxGridView, all client-side grid functionality stop working. We have tried the solution discussed here http://www.devexpress.com/Sup...

Recommended Solutions for Creating a Callback that Chains Multiple Methods and/or Properties ?

We are working on a Builder type interface that basically constructs a list for doing CRUD management of individual objects (since we're using ActiveRecord an object == a database record). In order to make specifying the column values and parameters for list options flexible we originally implemented the callback arguments as an array t...

CGScreenRegisterMoveCallback still not working?

Are Move calls still not sent by the window server, which makes registering CGScreenRegisterMoveCallback callbacks with CGScreenRegisterMoveCallback() futile? According to http://lists.apple.com/archives/quartz-dev/2008/Jan/msg00052.html this is a bug that's yet to be corrected (though it's been almost 3 years now). Is there an alterna...

Codeigniter callback validation problems

I want to create a callback function that is used during validation to check if the username / email address is already in the database... problem is I just cant seem to get it working So this is the callback function: function callback_username_available($username) { if($this->user_model->username_available($username)) { ...

PHP Callback function not working on object functions

I have an array and want to apply MySQLi->real_escape_string on every member of the array through array_walk but this is not working: array_walk($array, '$mysqli->real_escape_string'); It gives this error: Warning: array_walk() expects parameter 2 to be a valid callback, function '$mysqli->real_escape_string' not found or invalid ...

jQuery blur calls 2/3 times after being called 2/3 times

I have some jQuery code, where you click on text and it changes into an input and when it blurs (looses focus) it changes back to text and visa versa, however on the third call is completely breaks and I have no idea why? Does someone have any idea? Code at http://jsfiddle.net/Pezmc/x2fQP/4/ Copy $(document).ready(function() { fu...

Best implementation for a callback method to update multiple fields

Hey everyone, I am developing a mobile application (BlackBerry) with Java that makes use of the Google Translate API. I have it set up so that a user can specify a language before logging in, and then once they log in, I have wrappers around every piece of text displayed to screen which will translate the text based on the language cho...

Callback issue with jquery/js/ajax

UPDATE3 and FINAL: SOLVED thanks to Evan and meder! UPDATE2: I should clarify, I need function updateFilters (a,b) to be called, not created. The function exists elsewhere. Sorry for confusion. The code below does not work as expected - udpateFilters(a,b) is being called before for loop ends. Changing async to false solves the problem,...

ActiveRecord Global Callbacks for all Models

Hi All, I have around 40 models in my RoR application. I want to setup a after_save callback for all models. One way is to add it to all models. Since this callback has the same code to run, is there a way to define it globally once so that it gets invoked for all models. I tried this with no luck: class ActiveRecord::Base after_s...

trigger method in inherited class - windows forms

Hello, this is my scenario, and I want to know if it's possible to accomplish what I intend to do: I have a class library (made in c#) that inside has a class (named SForm) that inherits from System.Windows.Forms.Form. In that class I declare some strings, and methods to set those strings' values. public class SForm : Form { public ...

WCF Callback: Is it interoperable with Java?

Currently I implement all my webservices in the "normal" fashion... that is, I create a WSDL file in Eclipse and then use WSCF.blue (A visual studio extension) to auto-generate the necessary code and it is reply/request. However I was hoping to use callbacks instead, so I can have my services become "push" services. Before I jump into r...

passing a function which returns void but has integer arguments to another function as an ARGUMENT itself

hello , I have recently started working on OpenCV using c++.I am having a problem with the following code. #include "cv.h" #include "highgui.h" int g_slider_position = 0; CvCapture* g_capture = NULL; void onTrackbarSlide(int pos) { cvSetCaptureProperty( g_capture, CV_CAP_PROP_POS_FRAMES, pos ); } int main( int argc, ch...

jQuery Cycle Plugin callback error

I can't get before & after callbacks to work with the cycle plugin for jQuery! I'm not sure what's going wrong, i even tried using the sample code from the documentation. Here's the code: $(document).ready(function(){ function onBefore() { alert('before'); } $('.slideshow').cycle({ before: 'onBefore' }); }); a...

Jquery - Document click disables postbacks ?

Hi, i have a div to show when i pressed a button and hide when i pressed anywhere. jQuery(document).ready(function () { $(document).click(function (e) { if (e.button == 0) { $('#DivToHide').hide(); } }); //If its own, return $('#DivToHide').click(function () { return false; }); ...

Callback functions from kaltura html5 video

Can anybody help me how to call video callback functions from kaltura html5 video player. ...