All Questions
256
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;
...
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 () {
...
26
votes
8
answers
25k
views
Python: Callbacks, Delegates, ... ? What is common?
Just want to know what's the common way to react on events in python. There are several ways in other languages like callback functions, delegates, listener-structures and so on.
Is there a common ...
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 ...
16
votes
4
answers
13k
views
NSTextView value changed
I'm pretty new to mac development (coming from a web and iOS background) and I can't work out how I could get a notification every time the value of an NSTextView changes. Any ideas?
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 ...
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
...
12
votes
4
answers
10k
views
Watching a variable for changes without polling
I'm using a framework called Processing which is basically a Java applet. It has the ability to do key events because Applet can. You can also roll your own callbacks of sorts into the parent. I'm ...
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 ...
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(...
7
votes
2
answers
10k
views
Unreal Engine 4: C++ Delegate not being called
I've been working on converting some blueprint logic over to C++. One of the things I have is a button. The button can be pressed in VR and has a delegate that is called to notify any registered ...
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:
// ...
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
1
answer
3k
views
d3.js undefined data value in callback function click event [duplicate]
I'm trying to pass a value to a d3 click event bind to a group composed of a circle and a letter. However this value remains 'undefined' in the callback function. On the other hand if I pass the same ...