events

WM_MOUSEHOVER in a global hook

I have implemented custom tooltips for a couple of controls in my application (MFC) but I would like to make it general for all the controls. Right now I am calling TrackMouseEvent in WM_MOUSEMOVE and then catching WM_MOUSEHOVER (both in the overwritten function WindowProc of the control). But this way I have to duplicate code for every...

Javascript and DOM event interaction and possible race conditions

Scenario: Preloading images Perform an ajax query Show loading screen Retrieve results from ajax query Insert images into the dom Wait for images to finish loading Hide loading screen I was thinking of doing the following: function ajaxCallback(results) { /* snip insert into dom code */ $(".waitForLoad").each(function() { ...

Multiple Drag and Drop actions on one control

I have a windows form that contains two usercontrols. One usercontrol contains two list views. The other usercontrol has a grid. Within the first usercontrol the two list views drag and drop their contents between each other. The grid usercontrol is setup to dragdrop onto the listview usercontrol. The problem is that the drag drop eve...

Event Signature in .NET -- Using a Strong Typed 'Sender'?

I fully realize that what I am proposing does not follow the .NET guidelines, and, therefore, is probably a poor idea for this reason alone. However, I would like to consider this from two possible perspectives: (1) Should I consider using this for my own development work, which is 100% for internal purposes. (2) Is this a concept that...

How do I add Page Events for ASP.NET in Visual Studio 2008

This is a bit of a Visual Studio question. I feel with all the helpful Intellisense there should be something to assist but I can't seem to find it. I made a page with a codebehind in ASP.NET C# in VS2008 and it autogenerates a PageLoad event method, of course. Well, what if I want to add methods for more events besides PageLoad? I w...

WPF calling commands via events

Hi, Is it possible to call a command via an event in WPF? I have a save button that when pressed calls a command, this is pressed when you have finished editing a textbox, it also passes an object as a command parameter <Button Content="Save" Command="{Binding DataContext.SaveQueueTimeCommand, RelativeSource={RelativeSource FindAnce...

Combing an External Event Loop with Qt's

I'm building a Qt client for the open-source client/server 4X strategy game Thousand Parsec. This a Google Summer of Code project. I'm however stuck at a dead end. Basically, the client interfaces with the server via a C++ protocol layer that facilitates client/server communication. The protocol's documentation is available here. Now my...

How to implement event

class Foo(){ public List<string> SomeCollection; } I need to implement an event which can fires when something added or removed from the Collection. How to do this? ...

How to generate multiple mousedown events with overlapping objects in jQuery?

I have several (somewhat) overlapping divs, and if the user clicks on part of the overlap, I want a mousedown event (or any similar callback) for each div that's below the mouse coordinates. The standard way, of course, only generates a callback for the topmost div. Is this possible? ...

Swing: How to achieve forwarding of all events from subcomponents to parent container?

Hello! I'm looking for a straightforward way to make a Swing component forward all received events to its parent container (or even all parents up to root). EDIT: Where do I need this? I have a diagram editor. Components must forward key press and mouse clicks (to set themselves as "active" as soon as the user clicks a subelement of th...

Help with the WPF TextCompositionManager events

The docs on this are pretty shoddy. There are a number of events you can hook into to monitor and take control of text input that are accessed via the TextCompositionManager. If you're wanting to do something like snag card swipe data, this is where you'd do it. There are three events that concern text input: TextInput, TextStart, an...

SQLite triggers and raising events in other processes

I'm new to triggers so I apologize if this is a stupid question. Is it possible to have a trigger (or some other database mechanism) raise an event in another process. For instance, I need an application to be made aware of a certain activity (update in a specific table with specific data), but I'd rather not have that process poll the...

ActionScript 3 Newb: TextInput enter event?

I'm trying to capture the ENTER event of a TextInput like so: a_txt.addEventListener(fl.events.ComponentEvent.ENTER, aEnter); function aEnter(ComponentEvent):void { //... } There's probably something in these docs http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/TextInput.html#event:enter which I don't quite...

How can I process the new content in a text box after the onkeydown event?

I have a text input : <input type="text" onkeydown="processText(this)" /> I have a processing function : function processText(sender) { console.log(sender.value); /// processing.... } But then I check my value, its content hasn't been updated yet. How can I do that? ...

Is it bad to not unregister event handlers?

If I have an application with only a few event handlers registered (and the objects using the events are not disposed until the application is closed), do I really need to worry about unregistering those handlers? The only good reason I could see is that there might be a little extra overhead if events are being fired that you dont nece...

HiddenField EventHandler ValueChanged not fired when changed via Javascript

I have a HiddenField control that is created within my ASP.NET server control. I added a new EventHandler for the ValueChanged event. Will this event be fired when the value of my HiddenField changes from within a javascript function? The main problem I am having is trying to retrieve the value of my HiddenField server-side when the v...

JQuery, event bubbling on table cells. How to work out which row is clicked on

I have table enclosed by a div that looks similar to this....... <div id="records"> 10 | text1 | Delete 23 | test2 | Delete 24 | text3 | Delete 32 | text4 | Delete </div> I'd like to make the "Delete"s clickable which calls an ajax script to remove them from the database. Each of the 'Delete's has a class of "delete_record" The ta...

Forwarding events in C#

I'm using a class that forwards events in C#. I was wondering if there's a way of doing it that requires less code overhead. Here's an example of what I have so far. class A { public event EventType EventA; } class B { A m_A = new A(); public event EventType EventB; public B() { m_A.EventA += OnEventA; } p...

Quick jQuery question: Stopping event propagation?

I have a set of elements that respond to mouseUp events, and inside of them are child elements that respond to mouseUp events as well (all via. jQuery). How do I make it so when a child's mouseUp event occurs from a user mouse click the child's parent's mouseUp event doesn't also occur in jQuery? ...

C#, Event Handlers and Threading

I'm writing a little chat app, and I have this event handler: void o_Typing(object sender, EventArgs e) { MessageBox.Show("Fired!"); this.Text = "Fired!"; } o_Typing is a method in a class derived from TabPage. Basically, I want each conversation to have it's own tab. The event handlers are fired by my Chat object, which is r...