event-handling

Title-changing effect/window event listener does not work

Hello, I tried to search but could not find out anything useful. This is a piece of code for my Greasemonkey script. Basically, I want to have the same effect as Gmail. When the page loads and you have new messages, the title will change repeatedly and make you notice. The problem is it does not work for the first time. For example: The...

Add a row to a jTable each pass through a loop??

I have a jTable and a jButton. When clicked, the button's actionPerformed method calls another method that contains a while loop and adds a row to the table's model (DefaultTableModel) each time though the loop. The while loop can run for a few minutes so I want it to show in the GUI the rows being added to the table each time, one by on...

wxWidgets and context menus

I'm trying to add context menus into a (large) custom control in my application but have run into a number of issues with when to create them. There are 3 cases when a context menu needs to be created (unless I forgot one...) on a right mouse click, when the menu key is pressed and for Shift + F10. In all cases the menu is created and d...

DataGridTextColumn event binding

What is the simplest way to bind an ICommand to a DataGridTextColumn that will handle a user double click on that column without code behind? Can I somehow expose an underlying FE and do it all in the XAML? This particular column is read only and here is the xaml for it: <dg:DataGridTextColumn Header="Number" Binding="{Binding Business...

Event handling for dynamic controls in VB6

How can i achieve event handling for dynamic controls in VB6? Any ideas? ...

How do I calm down this hyper event listener

I have a simple silverlight toolkit Chart and a standard Slider in the same control. I want the Chart to be updated whenever the slider value changes. This oughta be simple. I tried binding to the .ValueChanged event on the slider but this appears to fire far too often (eg: multiple times while the slider is still in motion). I'm only in...

map motion event handling

How can I detect map motion or any event handling available for map motion, ie. when the user is moving the map? Regards, Aswan ...

how do I handle messages asynchronously, throwing away any new messages while processing?

I have a C# app that subscribes to a topic on our messaging system for value updates. When a new value comes in, I do some processing and then carry on. The problem is, the updates can come faster than the app can process them. What I want to do is to just hold on to the latest value, so I don't want a queue. For example, the source publ...

Global event if a jQuery selection returns no elements?

Is there any way to globally monitor or listen to if a selection is made in jQuery and it returns no elements? E.g.: You have a page with: <div id=”some-id”></div> And in a JavaScript someone tries to get the element but mistypes the id: $(“#someid”) Is there any way to globally handle when a jQuery selection returns no elements? ...

dynamic controls based on user postback

Suppose I have a treeview, where each treenode contains an id for a different set of user controls. When the user clicks a node, these controls should be loaded to the page. As I understand the ASP page life cycle, dynamic controls should be added in the initialization stage, and postback events will fire later on. So if the treeview ...

Understanding Actionscript Garbage Collection

in an attempt to see and hopefully understand actionscript's garbage collector, i've set up a sample project that loop-tweens the value of a pixel bender parameter on stage. my first concern was the amount of memory that was being used at launch (~26 MB). while i like to believe i'm cautious about memory by removing event listeners and...

Javascript function execution on link click?

Hi there, I have a link, that when a user clicks on it, it loads a different page as normal but also executes a JS function that autofills a specific text-box on that different page. Is it better practice to use Jquery or Javascript to do this? How can I do this using either one of them? ...

Nested Dynamic Controls, using Custom Event Handlers

I'm building a WinForm with quite a few dynamic elements, and I think I'm having some trouble with the parent/child relationship within nested controls. All the existing questions I could find seemed exclusive to WebForms, which wasn't entirely useful. I've also had some trouble with custom-made controls, but that may be a related issue...

Accessing functions bound to event handlers with jQuery

With jQuery you can bind functions to an event triggered on a DOM object using .bind() or one of the event handler helper functions. jQuery have to store this internally somehow and I wonder if is it possible given a DOM object, to find out which events have been bound to the object, and access those functions etc. The desired return re...

Downcasting non-template base class to templated derived class: is it possible?

Hi! I'm implementing an event system for a game. It uses an event queue, and a data structure to hold all registered event handlers for a given event type. It works fine so far registering handlers, but when it comes to unregistering them (something that will take place when a game object is destroyed, for instance) I'm having a bit of ...

C#: calling a button event handler method without actually clicking the button

I have a button in my aspx file called btnTest. The .cs file has a function which is called when the button is clicked. btnTest_Click(object sender, EventArgs e) How can I call this function from within my code (i.e. without actually clicking the button)? ...

Delphi and prevent event handling

How do you prevent a new event handling to start when an event handling is already running? I press a button1 and event handler start e.g. slow printing job. There are several controls in form buttons, edits, combos and I want that a new event allowed only after running handler is finnished. I have used fRunning variable to lock h...

jQuery equivalent of JavaScript's addEventListener method

I'm trying to find the jQuery equivalent of this JavaScript method call: document.addEventListener('click', select_element, true); I've gotten as far as: $(document).click(select_element); but that doesn't achieve the same result, as the last parameter of the JavaScript method - a boolean that indicates whether the event handler sh...

What is wrong with the JavaScript event handling in this example? (Using click() and hover() jQuery methods)

I'm working on a sort of proof-of-concept for a project that approximates Firebug's inspector tool. For more details, please see this related question. Here is the example page. I've only tested it in Firefox: http://troy.onespot.com/static/highlight.html The idea is that, when you're mousing over any element that can contain text, it...

Avoid stuck calling callback

Hello all, This is a question about generic c++ event driven applications design. Lets assume that we have two threads, a "Dispatcher" (or "Engine"...) and a "Listener" (or "Client"...). Let's assume that I write the Dispatcher code, and release it as a library. I also write the Listener interface, of course. When the Dispatcher execut...