events

Definitive way to trigger keypress events with jQuery

I've read all the answers on to this questions and none of the solutions seem to work. Also, I am getting the vibe that triggering keypress with special characters does not work at all. Can someone verify who has done this? edit: the solution does not work. Try it in firebug on stackoverflow: e = jQuery.Event("keydown"); e.which = ...

How do I register as a real-time ETW consumer for NT Kernel Events?

I have been able to use logman with some success to dump some kernel traces. However, I'd like to be able to programatically enable real-time consumption of kernel events (mainly thread/process creation/deletion and file I/O) in my application. What is the best approach to this task? ...

Using Delegates for handling an event.

Sorry, that's the best subject I can come up with, if I understood the solution better, I could probably phrase a better subject line. I am using a great grid control, Super List,l located here: http://www.codeproject.com/KB/list/outlooklistcontrol.aspx?fid=449232&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr...

Design patterns for event-driven logic

I'm developing a desktop application which depends on the XML data it receives from a server. There are several files, needed to be downloaded at different time. A number of data structures is populated with parsed data. The correspondence between files and data structures isn't 1-to-1, as a matter of fact may be rather complicated. Ap...

Why temporary variable can stop client from removing event handler?

The following code snippet is from book Effective C#, public event AddMessageEventHandler Log; public void AddMsg ( int priority, string msg ) { // This idiom discussed below. AddMessageEventHandler l = Log; if ( l != null ) l ( null, new LoggerEventArgs( priority, msg ) ); } The AddMsg method showsthe proper wa...

JQuery - add click event to LI or SPAN elements?

I am trying to add a click event to a LI element but it is not firing in the page. My page markup looks like: <div id="Navigation"> <ul> <li class="navPrevNext inactive">|&lt; First Page</li> <li class="navPrevNext inactive">&lt; Prev Page</li> <li class="navIndex selected" title="0 ">1</li> <li class="navIndex notselec...

Flex/AS3 Problem listening to an event dispatched from a Singleton Class

I have a singleton class for global access to config information. This singleton class called ConfigurationData extends EventDispatcher. Here is the class (note that I left some things out like variable declarations to keep this short): /** * Dispatched when the config file has been loaded. */ [Event (name="configurationLoaded", type=...

Can I have strong exception safety and events?

Suppose I have a method which changes the state of an object, and fires an event to notify listeners of this state change: public class Example { public int Counter { get; private set; } public void IncreaseCounter() { this.Counter = this.Counter + 1; OnCounterChanged(EventArgs.Empty); } protected virtual vo...

How should I bind to my textbox's events?

I am populating a textbox (txtFileNature) with a value from a popup window. The textbox has an onfocus handler set to onfocus=("this.blur();") The problem is that I want to do some calculations based on the value of txtFileNature and want to display the result below it. In which event can I can use my VB code. I can't use the textcha...

The proper way of raising events in the .NET framework

Currently "Avoid checking for null event handlers" is at the top of the answers to the post titled Hidden Features of C# and it contains severely misleading information. While I understand that Stack Overflow is a "democracy" and the answer rose to the top by virtue of public voting, I feel that a lot of people that up-voted the answer ...

How DataGridViewCellEventArgs helps to modify current value from a DataGridViewCell?

Hi SO People!, I'm using this event for remark the row when the CheckBoxColumn had been checked, so additionally I want to replace "programatically", the current cell[6] value from the same Row using the "Value" property but it fails cause by default the "readOnly" property is = "true". The DataGridView1.DataSource is retrieved from a L...

Passing Custom event arguments to timer_TICK event

I have class //Create GroupFieldArgs as an EventArgs public class GroupFieldArgs : EventArgs { private string groupName = string.Empty; private int aggregateValue = 0; //Get the fieldName public string GroupName { set { groupName = value; } get { return groupName; }...

jQuery "modify" event

So I recently took a closer look at JavaScript and jQuery and after that stumbled over the Firefox extension called Greasemonkey. Well, let me explain what I mean with the "modifiy"-event: I've got 2-3 userscripts for a certain page installed which automatically look if the page has changed in any way and if it has, they load the new co...

WPF MVVM : Commands are easy. How to Connect View and ViewModel with RoutedEvent

Hi Suppose I have a view implemented as a DataTempate inside a resource Dictionary. And I have a corresponding ViewModel. Binding Commands are easy. But what if my View contains a control such as a ListBox, and I need to Publish an application wide event (Using Prism's Event Aggreagtor) based on the Item being Changed on the List. if L...

How can I find out when a PyQt-application is idle?

I'd like to know when my application is idle so that I can preload some content. Is there an event or something similar implemented in PyQt? (I could also do it with threads, but this feels like being too complicated.) ...

.NET Events for Process executable start

Is there any way to register for an event that fires when an executable of a particular filename starts? I know it's easy enough to get an event when a process exits, by getting the process handle and registering for the exited event. But how can you be notified when a process, that isn't already running, starts...without polling all t...

WebBrowser Event Properties?

Can I figure out if a function has already been assigned to an event? e.g. (Standard winforms app with web browser control) namespace Crawler { public partial class Form1 : Form { WebCrawler.manager m; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, E...

Why am I unable to access the members of an event that is a member of a different type?

Note: this was inspired by WebBrowser Event Properties? Why am I able to access the MulticastDelegate members of an event within the type that declares the event but not outside of it? For instance: using System; class Bar { public static event Action evt; } class Program { static event Action foo; static Bar bar; ...

How can I write to a custom event log from my ASMX web service running as network service?

I have a ASMX web services running as 'network service'. I want to be able to write to a custom event log every time a web service is called (and when errors happen). I have created a new event log (MyLog) using the following code running as admin on a Windows server 2008 machine: if (!EventLog.SourceExists(APPLICATIONN...

Calling a user defined JS function inside returned AJAX content

Hi, I have a system that loads a div with content through the use of AJAX. All is well, I can get the div to load perfectly with details from my database and it works great. The problem is this: Inside the returned div, I have a couple of buttons with onclick events. The onclick events cause an error when I attempt to call a user defined...