I have a Flash/AS3 project I am trying to add a call back on, I added the call back like so:
ExternalInterface.addCallback('force_refresh',force_refresh);
and I am calling in from JS like this:
function thisMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];
} else {
...
I know how to manipulate a textbox on a Form, from a Form, but I do not know how to manipulate a textbox from a CLASS in it's own file to a Form.
Can someone explain to me how I would write a Delegate & a CallBack so I could simply call a method from a Class in a different file, and change stuff on a textbox from a different form?
I do...
I am writing an Objective-C class but is uses an API written in C. This is mostly fine as mixing C calls with Objective-C calls causes few problems.
However one of the API call requires a call back method (example):
success = CFHostSetClient(host, MyCFHostClientCallBack, &context);
Where MyCFHostClientCallBack is a C function defined...
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...
I am building a search with the keywords cached in a table. Before a user-inputted keyword is looked up in the table, it is normalized. For example, some punctuation like '-' is removed and the casing is standardized. The normalized keyword is then used to find fetch the search results.
I am currently handling the normalization in the ...
In the book 'Code Complete' the author talks about programming into a language (instead of programming in a language). He means, that you should not limit yourself by the restrictions of the chosen programming-language.
A callback is an often used feature. I'm interested: What is the most elegant way to programm callbacks into the java-...
Hi, I want to have some kind of bounce effect in my animation plugin but it isn't working. The callback isn't called at all:
$(function() {
var offset = $("#first").offset();
var position = $(window).scrollTop();
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll>position) {
$("b...
What is a callback function?
...
PHP functions such as 'array_map' take a callback, which can be a simple function or a class or object method:
$array2 = array_map('myFunc', $array);
or
$array2 = array_map(array($object, 'myMethod'), $array);
But is there a syntax to pass a method which is bound within the iteration to the current object (like 'invoke' in Prototype.j...
Say I have a queue full of tasks which I need to submit to an executor service. I want them processed one at a time. The simplest way I can think of is to:
Take a task from the queue
Submit it to the executor
Call .get on the returned Future and block until a result is available
Take another task from the queue...
However, I am try...
I have an update panel in an ascx page using .Net 3.5.
The user enters data, initiates a callback, and ajax updates the DOM.
Usually everything's all hunky dory. Once in a while the DOM gets updated and IE doesn't bother refreshing the display. The entire updated area appears to be blank.
Once the user does something that would trigge...
Hi guys, we have a problem [cit.]
I need to assign a callback dynamically within a class, in base of a variable param: my goal is to have just one class (and not a main class and many extender sub-class), and inside this class if a value is X, then the funcitonX must be used, if is Y, the functionY.
I know i cant explain well, i hope m...
I hope I can find a solution to this one. Here it goes:
After I have submitted my form to add a message to the database, I create a <div> with the load method. After that I do some stuff in the callback function.
When the function to create the new <div> has finished, it returns to the calling function that is supposed to prepend the m...
I'm able to issue $.ajax() requests to urls that have a '.js' extension just fine when I use {...'dataType' : 'script'...}. However, when I use {...'dataType' : 'json'...} the browser (Opera and FF, so far, but I'll bet it's universal) asks to save/open the results of the request.
Note that my 'success' callback runs fine and uses the r...
I want to use the google geocode via HTTP functionality to translate a city name into longitude and latitude in for my AJAX web application.
However, it appears that no callback function exists for the HTTP geocoder functionality
http://code.google.com/apis/maps/documentation/geocoding/index.html
Is that true, no callback function exi...
I'm having trouble rebinding slimbox2 after ajax content is loaded. I realize I need to rebind the function on the ajax load but I have no idea how to do that. I'm using this code to generate the external content.
$(document).ready(function() {
$('.content_box').hide();
$('.sf-menuUP a').click(function(){
$('.content_box').fadeIn('slow...
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 ...
I'm abusing C++ templates a little and I'm having trouble figuring something out. Let's say I have two types that really should be inherited from a base type, but for speed reasons, I can't afford to have the virtual function overhead (I've benchmarked it, and virtual calls ruin things for me!).
First, here are the two classes I have
...
I'm trying to set data in long-term storage in a GreaseMonkey script, except that GM_setValue() seems to fail silently:
$("a#linkid").click(function()
{
GM_setValue("foo", 123); // doesn't work, but does not generate error
});
GM_setValue("bar", 123); // works properly, value is set
...
Hello,
I have a question about how too keep one event perform an action without being canceled
by the next line off code
In this case I don't want the remove action cancel the hide behavior
Maybe, this falls into the category off callbacks, but I am not sure if I can use it in this case
the code beneath already resides in the callbac...