All Questions
27
questions
68
votes
10
answers
104k
views
Pass extra parameters to an event handler?
Let's say I want to pass some extra data when assigning an event handler. Consider the following code:
private void setup(string someData)
{
Object.assignHandler(evHandler);
}
public void ...
58
votes
7
answers
55k
views
JavaScript Callback Scope [duplicate]
I'm having some trouble with plain old JavaScript (no frameworks) in referencing my object in a callback function.
function foo(id) {
this.dom = document.getElementById(id);
this.bar = 5;
...
17
votes
2
answers
19k
views
Backbone.js Event Binding
I'm using Backbone.js have a segmented control-type UI element for each model's view. They are each made up of a ul with a few li elements. I want to bind an event such that when one of these elements ...
5
votes
4
answers
18k
views
in Jquery how to run code with callback before submit
I need to run some jquery code before submitting a form and there seem to be some issues.
Just hear me out before you rush to recommend this:
$(function() {
$('form').submit( function() {
...
13
votes
3
answers
10k
views
How to reference an event in C#
I have the following class, which has one public event called LengthChanged:
class Dimension
{
public int Length
{
get
{
return this.length;
}
set
...
33
votes
10
answers
99k
views
How to run a callback function on a jQuery trigger("click")?
I need to trigger a custom event in the callback of a trigger call, but I can't get it to work.
I tried this:
var $input = $( ".ui-popup-container" ).find( "input" ).eq(2);
function runtests () {
...
13
votes
5
answers
23k
views
TinyMCE: How bind on event after its initialized
I already searched a lot but by google-fu'ing don't get me any results :(
I have an already initialized tinyMCE editor which initialization process I cannot control, so code like the following don't ...
7
votes
4
answers
29k
views
callback after jQuery.trigger() function
i have got a little problem here. I have to trigger an event which contains $.post() to load a form and assign it to a DOM. After this is done, i have edit the fields of the form.
I tried:
$.when(...
2
votes
0
answers
299
views
can Matlab global variables yield better performance in Matlab?
I hate using global variables, and everyone should. If a language has no way around using global variables it should be updated. Currently, I don't know any good alternative to using global variables ...
-1
votes
1
answer
447
views
CallBack response for google+ follow button
I need a callback event when a user is successfully logged into the Google+ at time of follow button click.
This code is not giving any callback response :
<!DOCTYPE html>
<html lang="en"&...
8
votes
1
answer
2k
views
How should I update my UI from C# events triggered by serial port data?
I'm a tech-level employee helping out with some of the coding in a manufacturing test environment. The specific question is handling events in C#. Not just Button_click, specifically if I have a ...
6
votes
3
answers
8k
views
Implementing a callback in XML-RPC or SOAP
I am trying to get an understanding of how I can use SOAP or XML-RPC to create a remote, open API for my product.
Problem is, part of my API will require me to be able to get events pushed from my ...
6
votes
3
answers
3k
views
Understanding JavaScript's single-threaded nature
I've been reading John Resig's "Secrets of a JavaScript Ninja" and it explains that JavaScript is single-threaded. However, I tried testing this and I'm not sure what to take away from here:
// ...
5
votes
2
answers
2k
views
node.js execute function after 'n' async callback are executed
I can't get how can I execute a callback after 'n' async functions are executed, example:
var after4AsyncOperation = function(){
//do something...
}
process.nextTick(function(){
//do stuff
}...
4
votes
3
answers
2k
views
c++ execute function any time a stream is written to
I have a simple GUI program that uses a custom stringstream to redirect output from the console to a text field in the GUI (under some circumstances). currently. the window redraws any time I hit ...