event-handling

How to close a window in c#

I've got the following code in a window B that is started in its own thread from a window A. view.Closing += (sender, e) => { view.Visibility = Visibility.Collapsed; e.Cancel = true; }; When I close window A window B remains in memory and the application doesn't dispose. How should I go forward make sure that the application i...

How can I subscribe multiple buttons to the same event handler and act according to what button was clicked?

I have 6 buttons that I want to be attached to the same handler. How can I do this? ...

Passing events to parent

Hi, I'd like to create an app where some events are supposed to be handled as if they were delivered to parent containers. For example I've got a JPanel which contains JLabel. The top JPanel implements mousepress and dragging right now. What do I need to do, in order to make the events look like they arrived to JPanel instead of the labe...

jQuery click action does not trigger onclick attribute

I am having problems getting a function that clicks all search matched checkboxes. The click event seems to fire, but no checkbox gets checked nor is myFunc() called. It works perfectly when clicking each checkbox manually, but who wants to do that with 40+ checkboxes - not my users. You may wonder why I use a div-onclick instead of dir...

ASP.NET: Call codebehind if javascript doesnt exist in browser,Else javascript function

In asp.net page, How can i call the javascript methods for form processing-submitting if the user browser supports javascript and use code behind events if the browser does not support javascript.I have the javascript code to send the form data to an ajax server page using jquery. Don't know how to invoke the needed one based on the brow...

C# event handlers

Is there a way to get number of attached event handlers to event? The problem is that somewhere in code it continues to attach handlers to an event, how can this be solved? ...

Event data passing in the inline event handlers

I have an <input> which has an onkeydown inline event handler. In this handler, I'd like to call a function and pass a special parameter to it - the event data. When I want to handle events (e.g. onmousemove) for the whole document, I use the following code: document.onmousemove=function(e) { // here I can make a good use of the 'e' va...

Android: Add event listeners to every item in a ListView

I have an Android app with a ListView, and each row in the list has a TextView and a Button. What I want to do is add an OnClickListener to each Button in the ListView, but I can't figure out how to get some sort of reference to every Button... Can anyone please give me a hint? Here's my XML that's bound to the ListAdapter: <RelativeLa...

AIR - Native Process Listeners

i'm launching a native process from my AIR app which loads a command line program as a background process and need to know when the process has successfully executed and is ready. when the program has launched normally by simply double-clicking on the file, it opens in Terminal (Mac OS X) and outputs some text stating that it is ready f...

Find All Event Handlers for a Winforms Control in .Net

Is there a way to find all event handlers for a Winforms control? Specifically statically defined event handlers? ...

Calendar, Dynamic LinkButton CommandEventHandler Help

Hi, I am attempting to create a calendar which is just a simple UI to display dates and dates to users of our system. I have overridden the Calendar's "DayRender" event to gain access to each cell and then insert a couple of dynamic controls to display specific data. The display of the controls works great. However, I recently wanted...

Making onpropertychange and domattrmodified work to detect when elements are changed

Something should trigger, no? I get not supported in IE8 and nothing happening in Fx 3.6.10 <html> <head> <script src="http://code.jquery.com/jquery-1.4.2.js"&gt;&lt;/script&gt; <script> // modified from http://pragmatec.blogspot.com/2009/06/google-toolbar-style-and-tooltip.html jQuery(function($){ $.fn.dommodhandler = function(opt...

How is event-driven programming done?

My question is pretty simple: how is event-driven programming actually achieved? To elaborate: I have a Rails application, every time a user makes a change on the website, the model writes that "change" to a text file (as JSON.) What I'd like to do is hook an IRC bot to that "event." (the creation/modification of the text file.) How i...

Android Key Events for EditText not happening on device

I am new to Android development and having a problem with what SHOULD be a very simple task. I want to receive KeyEvents whenever a user is typing in an EditText field because I want to save their entered values to data structures in the background on each key stroke. I have mimic'd the code in the Beginner's Dev guide at http://develop...

How do I return a value in for a event (bubble value up)?

I am trying to change a value in the event arguments. Not sure if this is possible, but this is my current event in the parent class: public void MasterClass() { void btnSubmit_Click(object sender, EventArgs e) { ... OnInputBound(this, new InputEventArgs(postName, value)); //I would like to try something like this ...

Dead keys don't arrive at keyPressedEvent()

I'm using Qt 4.3.1 (I'm not able to uptade at the moment) for a program, anyway in Windows dead keys (^, ´, `, ...) don't arrive at the keyPressedEvent(), i always have to press them twice. So why don't those dead keys arrive? How can I fix it? In MacOS everything works fine though. Thx, eL. ...

How to implement click and pause/resume in flash?

Most flash video tutorials have this kind of feature,1st click pauses the video,while 2nd click resumes it. How's that implemented in flash? ...

Adobe AIR application to receive back events from native Windows application

I'm trying to develop a simple mxml Flex application to start Skype from the AIR/Flashplayer runtime. Is it possible to get back events from a native Windows application? In the simple example of Skype, the OS returns control to the Flex app when Skype exits. But what about native applications which have their own event model and wants ...

How to implement a custom listview row with buttons?

I have an ExpandableListView that I want to populate with my custom views of type NoteView. NoteView extends LinearLayout and contains two buttons and a checkbox. I have almost everything working, the NoteView's are being populated with backing data, the lists are getting filled, and the buttons are clickable and perform the required t...

PHP: How to realize event handler?

I want to add custom event handler to object's method. I've got a class with method. class Post { public function Add($title) { // beforeAdd event should be called here echo 'Post "' . $title . '" added.'; return; } } I want to add an event to method Add and pass method's argument(s) to the event ha...