events

C#: Action delegate vs explicit delegate

Hello Just a quick one: what are peoples thoughts on using Action delegates for public class events vs defining ones own event delegate types? I know many use Actions for "minor" delegates such as in lamdas and .ForEach() extension methods, etc, but for actual class event members, is using Actions a good idea? What is "best practice" ...

How to record sound of a key press on iphone?

Hi, I am developing an application in which I want to record the sound of a piano key press. I'm not able to find anything relevant on the internet which helps. Can anybody share the code or any link which shows how to record the data of the piano key press, store it somewhere in memory and then play it again? or If anybody knows how...

ASP.NET WebForms - Keeping contextual focus on Button controls

Consider the following: <form runat="server"> <div> <asp:TextBox runat="server" ID="tb1" /> <asp:Button runat="server" ID="b1" OnClick="b1_Click" /> </div> <div> <asp:TextBox runat="server" ID="tb2" /> <asp:Button runat="server" ID="b2" OnClick="b2_Click" /> </div> <div> <asp...

HTML "overlay" which allows clicks to fall through to elements behind it

I'm trying to overlay a element on top of a webpage (to draw arbitrary graphics), and I've come to the point where I can stack it inside of a element on top of everything, but this prevents the user from clicking on any links/buttons/etc. Is there a way to have its content float on top of everything (it's semi-transparent, so you can s...

WPF: I don't understand class TextCompositionEventArgs

I don't understand the class TextCompositionEventArgs. There are members of type string named ControlText,SystemText,Text. Then there is a field TextConmposistion which itself contains the members ControlText, SystemText and Text again and additionally the fields SystemCompositionText and CompositionText. public class TextCompositionE...

Is event listener using CPU time

Maybe this is a dumb question, but do event listeners use CPU cycles like a timer, or are they inactive until the event is fired? Is it language specific, or do all languages handle this basically the same? I want to write a tiny service that only does anything when a network disconnect event is fired, and I don't want the service to u...

C# Adding Events!!!

how can I add a double click event to a control that doesn't have a double click event =P like a combo box!!! ...

JQuery color animations not firing reliably

I'm having a problem using the jquery hover events. I've created a reduction of the problem. You can find a working demonstration here. I can reproduce this after moving the mouse around in IE, FF, Opera, and Chrome. I'm using queued animations in my mouseover event. Roughly 1% of the time, the color of the td elements is left as #...

How to find out whether somebody has subscribed to an event ?

I have a use case where i have to unsubscribe for an event. But prior to unsubscribing i want to make sure whether this guy has actully hooked on to this event or not. Please let me know how i can achieve this ? ...

How do we programmatically server-side add Outlook Events for several users?

We have to add and update outlook calendar events for several users (different appointments events for each user) under program control (VB or Ruby). A server solution with no action required by individual users is preferred. Simple ICAL based technology doesn't appear to easily support updating existing events (i.e. schedule chan...

In Swing, how to provide priority to user interaction when many components are constantly requesting a repaint?

Swing newbie question... I have a system where there is a large number of independent widgets in the window (think >100) getting asynchronous updates and then requesting a repaint. When these widgets get updates very very fast, they seem to overload the Swing event thread so that user interaction (e.g., right clicking to display the con...

JmenuItem mouse pressed work but mouse clicked event does not work? why?

I was trying to create a mouse clicked event of a JmenuItem but it did not work but mouse pressed event works. what is the difference between clicked and pressed and why only pressed works here? ...

YUI Event and Links

Using YUI, I have a div, with an attached listener that says if I click on the div, execute a callback function. Inside the div is a series of normal html links to other pages. What I WANT to happen is that if I click a link, I go to that page. But, if I click anywhere in the div outside a link, it executes the callback function. What...

MouseListener on JFrame

I want to be notified of mouse events (specifically the mouse entered and exited events) on my JFrame. But when i add a mouselistener to it i get the events on the borders of the frame not the entire frame with it's contents. Any ideas as to why? EDIT : Or at least do you have an alternative? I want a "gloabal" way to catch mouse even...

Qt RTTI trouble

In a quest for handling events (like mouse moves and clicks) not by subclassing, one has to use installEventFilter and provide an event handler. While doing so, I've encountered a problem with RTTI support, meaning that typeid().name() gives QObject * all the time, no matter on which object event was triggered. There is, of course, anoth...

EventHandler is null

I am trying to raise a click event from User control and handle it on the containing page. The problem I have is, when I click the button 'imgstep1' on the user control, the code behind imgstep1_click event triggers and but the 'btnHandler' event is alway null. Hence it doesnt call the parent event. Any help on this will be much appreci...

Event fired on select box (html) being populated

I've been wondering if browsers fire any event when select box is dynamicaly populated? I would expect 'onchange' being fired, but that doesn't happen. ...

Is it possible to automatically hook up events in C# using VS2008?

I recently switched over to C# from vb.NET and within visual studio found that hooking up events is extremely annoying. In VB I could select a control from a drop down on the top left and the event on the top right drop down and the method would automatically be created and attached to the control using "handles". I know that is not su...

Events from inside a DataBound Control

I have an asp:Repeater with an asp:DropDownList in it. The DropDownLists in the repeater raise their SelectedIndexChanged events on every postback, regardless of whether they were changed or not. Is this a known issue in ASP.NET? Do you know how to work around it? I found this workaround but would like something prettier if at all po...

AS3 - Events are no longer received after adding a preloader swf

This was my initial structure: main.swf -> child.swf Main loads various child swfs. I am dispatching events from the child swfs, and main is listening for the events. Everything was working great. Then, I added a preloader swf, so now the structure is: loader.swf -> main.swf -> child.swf I did not change the relationship between main...