callback

jQuery plugin callbackfunction with parameter

http://stackoverflow.com/questions/3205565/jquery-function-probem I have managed to get the above plugin working with your suggetions. However, now I want to change it slightly to make it more generic. I want to pass in callbackFunctionSingleAddress and callbackFunctionMultipleAddress as well as how many parameters they expect in the s...

ASP.Net Client-callback not working from ASCX control

I need to call ASP.Net server side code from the client. Because I'm in an ascx user control I can't use [webmethod] + PageMethods as this only works on ASPX pages. The next option that I thought would work was manually creating a client-callback. Using this method the client will successfully call the server code but the client will no...

Update mongodb document without updating embedded document and vice versa

Hi I have a document with an embedded document in it. I have 2 forms, 1 that updates fields in document and one that updates fields in emdedded docs. They are split into 2 forms as lots of fields in each etc and actually this is just a simple example of the structure of my app. Everywhere else that i reference this data it makes m...

jQuery plugin callback function and parameter settings issue

I have developed below plug-in (function($) { $.fn.addressSearch = function(settings) { settings = jQuery.extend({ searchClass: "quickSearch", checkElement: "href", dataElement: "data", countryListCla...

How to pass a variable to a re.sub callback?

I am using a re.sub callback to replace substrings with random values, but I would like the random values to be the same across different strings. Since the re.sub callback does not allow arguments, I am not sure how to do this. Here is a simplified version of what I'm doing: def evaluate(match): mappings = {'A': 1, 'B': 2} re...

Assign javascript CallBack function to a UpdatePanel

Hi All, I wanna assign a JavaScript CallBack function to an UpdatePanel which will be gets called when the UpdatePanel finishes its tasks. After, the UpdatePanel will be sending a string as a result. This JavaScript CallBack function will have to process this resulting string. Please help me out to achieve this. Regards, Akif ...

Socket.BeginRecieve is never re-called in the callback function

Hey all! I'm pretty fresh in the game of C# and .NET so I found some exercises on the net. More specifically an asynchronous web server. I'm currently having some problems with getting the callbacks to fire. Socket.BeginReceive fires its callback the first time, but when I try to do it recursively (like shown on MSDN Tutorial - to get a...

Make a phone call with qt 4.6.3

Hi, I need to trigger a phone call from a Qt application. I looked to previous post without find a complete answer. I need to make it with qt 4.6.3. I'm quite new to symbian development, I'm using the last nokiaSDK. It MUST work ONLY on n97 and E71. Can Anybody provide a solution? May be a solution exec an extenal process using QProces...

How can I remove callbacks inserted by vendor code?

A gem I am using inserts an after_save callback that I would like to remove. It seems to me it would be cleaner to delete a symbol from an array than to fix the problem with a monkeypatch. How can I access the array of callbacks? ...

before_create - destroying multiple records

Ok, I am trying to destroy multiple records in a before_create: class InventoryItem < ActiveRecord::Base belongs_to :user belongs_to :item before_create :replace_owned_items protected def replace_owned_items user = self.user item = self.item owned_items = user.retrieve_owned_items(item) unless owned_items.b...

create anonymous methods using "eval" - browser specific behaviour

Hello everybody. I working with jQuery and i needed to generate an anonymous method with the eval() function. The following lines worked with Opera but not with IE, FF, Chrome: var callbackStr = "function(){alert('asdf');}"; var callback = eval(callbackStr); callback(); This code works with all Browsers: var callbackStr =...

PHP Checksum before include()

I've been working on an application that will allow for third-party extensions to be built to expand the application's functionality. All this in PHP, of course. I wanted to add a bit of security padding by running files in a certain directory through a checksum function. If the file doesn't pass the checksum, the file isn't "included", ...

Writing jQuery plugins: how to set up callback to terminate plugin execution when false returned

Hello, I'm writing a jQuery plugin that has a couple of callbacks, and am at the point where I need to allow one of the callbacks to run. The callback in question is 'beforeListItemSelect', so naturally I'd like the plugin code after the callback to not run if the callback function returns false. So the following is a section of my plug...

C++ for_each calling a vector of callback functions and passing each one an argument

I'm fairly green when it comes to c++0x, lambda, and such so I hope you guys can help me out with this little problem. I want to store a bunch of callbacks in a vector and then use for_each to call them when the time is right. I want the callback functions to be able to accept arguments. Here's my code right now. The trouble is in vo...

Model Callback beforeDelete

I'm trying to delete images when deleting the container of those images with a cascading model::delete The cascading works fine, but I can't get the model call back afterDelete to work properly so I can delete the actual image files when doing the delete. function beforeDelete() { $containerId = $this->id; $numberOfImages = $th...

Notify me when the Flash movie is done playing

Guys, I'm new to working with flash and have a quick question about embedding flash with the SWFObject.js file. I can successfully embed an object and play it, but what I'd like to know now is if there is a way that I can be notified when the movie is done being played without editing the flash file itself, since I have no real way to ...

canceling the delegate for a specific UIView animation

I receive a crash on the call to the function set in setAnimationDidStopSelector when my view is animating as I remove the view and release the object. I'm not 100% certain that this is simply a case of a UIView animating while being released and the callback issued by the animation being called into a released object, but I suspect it ...

Access param in the callback of jQuery Nivo Slider plugin

HI, I'm using the Nivo Slider, a jQuery plugin allowing to create slideshow. He's perfect but I've just a little problem. Each pictures have an id (or another element like rel for example) and I would like to give this parameter in the callback function of Nivo (beforeChange: function(){}). But the problem, in this beforeChange callbac...

C++ Multiple Callback funtions problem

Hi, I have a dll which requires me to set a callback function for it (actually it's a camera sdk and it will callback my function when it receives a picture). I wanna have multiple (user input) cameras but I can't. Since I should make unknown number of callback functions. the easy way is to make a class (camera) which have a function f...

Dynamically set method on before_save.

In my controller i want to dynamically bind my instance method to the before_save callbacks. Is there any ways we can dynamically bind methods to the callback from controller side.... EDIT : Controller This original code.. def amfupdate set_properties validate_record if params[:csv_header][:validate_record] == "Y" #On this cond...