events

Handling object events inside collections

How do I properly handle the events of objects inside a collection? Example: I have a List<Ping> which asynchronously pings a number of servers. How can I tell if one of the items in the List have called the PingCompleted event? What if I add/remove Ping objects? ...

[Android 2.1] MotionEvent multiple touch events get mixed up and influence each other (see demo video)

Hi all, Purpose of the app: A simple app that draws a circle for every touch recognised on the screen and follows the touch events. On a 'high pressure reading' getPressure (int pointerIndex) the colour of the circle will change and the radius will increase. Additionally the touch ID with getPointerId (int pointerIndex), x- and y-coord...

Removing COM event handlers automatically in C#

I have a standalone .exe COM server and a trivial C# test program that launches an instance of the server and closes it immediately afterwards. Works like a charm. However, if I close the C# program itself I get an exception during the finalizer run because it is trying to unregister/unadvise COM event sinks from the no longer running CO...

Swing send an event programmatically

How can I do to create a custom event and send it programmatically to a component? E.g. If I had a JButton and wanted to create an ActionEvent or a MouseEvent and than send it as if an user had pressed on it which code I'd to use? The following code not work: JButton btn = new JButton("Click..."); MouseAdapter my = new MouseAdapter()...

When adding events to FullCalendar they are duplicated - multiple calls made to add event without cause

I am using FullCallendar and Jquery. I made a google calendar like interface and pull events from a json file. When a user clicks on a day a div opens for them to enter info click add event and the event is added. On the second click when the user clicks add event two events are added, one on the first clicked day and the second on the s...

Subscribe to event of changing time on local system

Is there a way to my C# winforms application knows when Date and time settings has changed on local computer. ...

How to find out which JavaScript events fired?

I have a select list: <select id="filter"> <option value="Open" selected="selected">Open</option> <option value="Closed">Closed</option> </select> When I select Closed the page reloads. In this case it shows closed tickets (instead of opened). It works fine when I do it manually. The problem is that the page does not reload when ...

Python threading ignores KeyboardInterrupt exception

I'm running this my simple code: import threading, time class reqthread ( threading.Thread ): def __init__ (self): threading.Thread.__init__(self) def run ( self ): for i in range(0,10): time.sleep(1) print '.' try: thread=reqthread() thread.start() except (KeyboardInterrupt, SystemExit): print '\n! Rece...

C# Button Not Firing?

I have an ASP Button that I am creating in the CodeBhind of a Control. Here is the code: Button SubmitButton = new Button(); protected override void CreateChildControls() { SubmitButton.Text = "Submit"; SubmitButton.Click += new EventHandler(SubmitButton_Click); } private void SubmitButton_Click(object sender, EventArgs e) { ...

non-blocking(event driven I/O) vs. blocking I/O

Recently I stumbled across this pretty slick JS library called nodeJS that acts like a server side JS. The main feature of the language being Evented I/O and which gives the inherent capacity of I/O being completely non-blocking!!! using callbacks. My question is if such kind of I/O mechanism which is completely non-blocking existed in...

identify whether a GUI event was fired directly by the user or because of a code assignment in .Net

Suppose you are using a control such as NumericUpDown which has the value property. and you set the value numericUpDown1.Value = 10; then the .net will fire the event numericaUpDown1ValueChanged(sender, args), also the user can directly set the value of this control and the .Net will fire the same event with the same sender. to be able ...

Inner-workings of Keyboard Event Handling under Linux

When I press a keyboard's key on some GTK application under Linux, what happens exactly? How does a key get received (from which device), interpreted, passed to the program, and then handled? ...

How to change my wx.toolbar event?

Hello, I have a wx.toolbar with some buttons. One of the buttons makes pan left! I want to click on the button and while I keep it pressed, the pan left is made. For now I only saw that the wx.EVT_TOOL only works when mouse left is up. Is there a way to do what I intend ? ...

WPF - understanding RoutedEvents

Hi I'm learnign WPF and currently I'm reading about RoutedEvents. In book "Pro WPF in c#" there is some snipet of code which I present below <Window x:Class="RoutedEventsLearning.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" ...

problem with download picture from canon camera to pc

hello i connected a eos canon camera to pc i have an application that i could take picture remotly ,and download image to pc, but when i remove the SD card from camera , i cant download image from buffer to pc // register objceteventcallback err = EDSDK.EdsSetObjectEventHandler(obj.camdevice, EDSDK.ObjectEvent_All, objectEventHandl...

how to permanently activate/set the global event_scheduler to 1 in mysql

Hey guys, I have added a event to my mySQL db and it works fine, but the thing that is bothering me is that every now and then I have to set the mysql global variable to 1 so that my event is active.I log in as root user and have complete privileges (I use it for practice purpose) Every time I log in to my mysql server I have to exec...

WPF Mousedown => No MouseLeave Event

Hey Guys, I'm currently building a WPF-Control with MS Blend and when I'm leaving my control and the left-mouse-button is pressed the MouseLeave-Event is not raised. Any idea how this could happen? Thanks in advance ...

iPhone: Resizing in drawRect:

Hi all, I have a UIView based control which I need to resize depending on various criteria and properties of the control. I'm not sure if the way I'm doing it is the best way but so far it's the only one I've found that seems to work. Because the size of the control is dependant on various properties, I cannot set the size in a construc...

Cancel all events from Page_Load

EDIT: for those who come here with a similar problem, now i know this was a BAD IDEA. hi, I have something like this: bool preventEvents; protected void Page_Load(object sender, eventargs e) { preventEvents = doSomeValidation(); } protected void Button1_Click(object sender, EventArgs e) { if (preventEvents) return; // .....

How to trigger a click event programmatically?

I'm trying to click panel splitter collaplse/expand button with javascript / jquery, to no avail. Here is an example of the splitters: http://jdevadf.oracle.com/adf-richclient-demo/faces/components/index.jspx;jsessionid=GTYNMf7Mq2JD6L4v38yCdTh2HLplhJYLTGc1J1TjZFwmpZjcqh1n!-294683649?_afrLoop=28596129526428344&amp;_afrWindowMode=0&amp;_a...