events

Serializing a .NET EventLogEntry instance to XML

When using the Event Viewer in Windows 7, there is a separate 'XML View' of an event that can be accessed from the Event Properties dialog. This XML refers to the http://schemas.microsoft.com/win/2004/08/events/event namespace. When I subscribe to Windows Events using the .NET framework classes in the System.Diagnosticsnamespace and ret...

Javascript: Enter for submit

Hello this is what i have in the head of my file: function entsub(event) { if (event && event.which == 13) write1(); else return true; } and in the body, my form is: <form id="writeform" name="writeform"> Message: <br /> <textarea name="message" rows="3" id...

DataGridView Event - which one to choose

I'm looking for an event that occurs right right after loading and after sorting. I have a piece of code that colors some of the Rows in a DataGridView control. But when I sort the style changes are lost. I need the right event to tap into to redo the coloration step after the load/sort events. Trying to right clean code ... so I was lo...

PyQT events between multiple objects

Hello fellow programmers, I am creating a GUI program in Python/PyQT and would like to know how I can connect an event which happens in a child object to the parent? For example, if someone clicks a 'Submit' button, how would i trigger something to happen in the parent object (lets say update a QLabel on the parent) Any help would be ...

jquery event help

I have a setup like this: <div id="container"> <div id="close">Close</div> </div> Then in my jquery I have this: $("#container").live("click",function(){ changeTabs(); }); $("#close").live("click", function(){ closeTabs(); }); The problem with that is that when you click the close div it fires both events. I a...

Assign an existing click event function to another click event using jquery

Ok so i have some html like this: <div id="navigation"> <ul> <li> <a>tab name</a> <span class="delete-tab">X</span> </li> <li> <a>tab name</a> <span class="delete-tab">X</span> </li> <li> <a>tab name</a> <span class="delete-tab">X</span> </li> <li class="selected"> <a>tab name</a> <span class="tab-del-btn">X</span> </li> </ul> </...

Dojo attach event to dynamically created element

I have a form. I include Dojo. Everything works fine. I use Dojo to change the class, values and attributes of input elements based on user input(sort of like validation). The problem is, because of IE, I'm required to create a new input element(that I know of) if I want to change the 'type' of an input from 'text' to 'password'. Once ...

Logging *Business* Events - use logging framework?

Hi, Something here doesn't feel right to me here, and so I would like the community's input - perhaps I am approaching this in the wrong way.... Q: Is is appropriate to use traditional infrastructure logging frameworks (like log4net) to log business events? When I say business events, I mean I want a global log like this: xx:xx Custo...

Browser window close event

I want to capture the browser window/tab close event. I have tried the following with jQuery: jQuery(window).bind("beforeunload", function(){return confirm("Do you really want to close?") }) But it works on form submission as well, which is not what I want. I want an event that triggers only when the user closes the window. ...

How do I get a ComboBox SelectionChanged event to fire from a nested ListBoxItem?

This is a rather complex problem that has me really confused right now. Any help would be greatly appreciated. The Setup: ListBox of Type A UserControls ->ListBoxItem of Type A UserControl -->ListBox of Type B UserControls --->ListBoxItem of Type B UserControl ---->ListBox of Type C UserControls ----->ListBoxItem of Type C UserCon...

Detecting Tap & Hold in UITableView cells - how ?

Hi, How do we detect a Tap & Hold on a UITableView cell (with and without disclosure buttons on the right).. ? ...

JavaScript Regex to return the last digits and ASP.Net event Handler?

Given the following string: 's0\\8\\26\\29\\30\\32' or 's0\\8\\26\\' or 's0\\5', I need to return the last digits of the string. Given: function getFolderID(mystr) { var reFolderID = /\bs0\\\\[0-9]+\b/g //regexp to return s0\\34 var retArr = []; var retval = ''; retArr = mystr.match(reFolderID); ...

How to synchronize content of one view depending on scroll position in sibling ScrollView?

I have extended LinearLayout (vertical) to create a custom compound component. This in turn contains two children: one custom view that is drawn directly onto the view canvas. one HorizontalScrollView->LinearView(Horizontal)->Multiple custom views. I would now like to redraw the custom view to match the visible contents of the scrol...

What are best practices for event id management?

I'm trying to figure out how to manage my event ids. Up to this point I've been putting each event id in each method manually with each step in a method numbered sequentially. This doesn't allow me to effectively filter events in the event log. In order to use the filter in the event log, it seems that every logged event must have its...

C# - writing a COM server - events not firing on client

I have implemented a COM server in C#, that has a vb6 client. When going to fire my events, the handlers are always null--it appears that the vb6 app never subscribes to my events. The vb6 application is an existing 3rd party app, and appears to give no error messages. Normal methods work just fine from COM client -> server. Is there...

How to call a function in a Class from another Class?

Update: Modified title to better reflect my question Hi everybody :) My question today revolves around a CustomEvent I'm trying to send from one sub Class to another. I've used my CustomEvent class to pass an event from a sub Class to my main class fine, but I'm not sure who to do that between sub classes. My Custom Event Class pack...

How to find which objects are listening to my event?

I have a class with an event: public event MyEventHandler MyEvent; Is there any way of getting a handle to the collection of objects (by reflection or otherwise) that are listening to this event? EDIT - Um, sorry to move the goalposts - I need to be able to do this using reflection bc I have a string value representing the event nam...

Prevent Validating/Validated event from firing in custom textbox - vb.net

I have a custom text box component (inherits from system.windows.forms.textbox) that I created in vb.net (2005) that handles the input of numeric data. It works well. I would like to suppress the validating and validated events from firing if the number hasn't changed. If a user is tabbing through the form and tabs from the text box, th...

VB.NET - Programmatically add event handler if it doesn't exist

I'm trying to use a single event handler for several controls in an ASP.NET web page. I would like to add the event handler at runtime if and only if it doesn't already exist. In C#, I would write it as seen below: if (myTextBox.OnTextChanged == null) myTextBox.OnTextChanged += DoTextChangingValidation; Likewise, I know I can remove...

Wiring threaded C# events in constructor

If a non-gui object constructor wires a local event handling method to the event field of an object on a different thread, is it possible for said event handling method to be called before the constructor is finished? Example: (semantic pseudocode only) public static B b = new B(); class A { public A() { b.evt += Event...