event-handling

Accessing class member variables inside an event handler in Javascript

I have a quick question regarding the proper way to access Javascript class member variables from inside of an event handler that class uses. For example: function Map() { this.x = 0; this.y = 0; $("body").mousemove( function(event) { this.x = event.pageX; // Is not able to access Map's member variable "x" ...

JavaFX to Regular Java Class Parameter Problem

My aim is to create a small javafx application that makes use of javafx forms (handled by separate java classes) for example: Login.fx (GUI) calls methods from LoginFunc.java. to handle user interactions. My problem is that I need to pass the username and password entered by the user to LoginFunc. Usually in swing applications i use a ...

how to clear event handles in c#

I'm using global variable named "client" For example client.getPagesCompleted += (s, ee) => { pages = ee.Result; BuildPages(tvPages.Items, 0); wait.Close(); }; client.getPagesAsync(cat.MainCategoryID); I need to clear handlers for getPagesCompleted and set another handler. How to easy clear handles? I know client.getPages...

How to check event handler assigned or not

my previos question is how to clear event handles in c# Now i need to know that how to check any event handler already assigned? ...

android.view.GestureDetector.OnGestureListener onFling() vs onScroll()

What is the difference of events of onFling() and onScroll() of android.view.GestureDetector.OnGestureListener? link text ...

Key handling in Android

Im trying to make a gane and i need to be able to move an object with the help of the key pad. I tried using the basic event handlers, like onKeyDown bit how do i redraw the screen?? ...

What is a good example to listen to event both at the "link" (or div) and at the parent or ancestor element?

Most of the time I see code registering an event listener for a link or a div or button, and handle everything from there. But the event capturing and bubbling is good to handle events at the offspring and then at the ancestor level. But what is a good example we will want to listen at 2 different places? ...

WinForms - is there an event captured for changed children controls by a containing panel?

Hi, I have a panel and in it are a couple of text boxes, I want to decide if to enable a button (also inside the panel) by the values of the the text boxes. Is there a predefined event the panel is registered to that captures the inner text-boxes onTextChange event? Thanks, Shuky ...

Detect Flowplayer on page and add event listener

Hi. I'm using the html5media library, which automatically replaces the HTML5 video tag on the page with the Flowplayer Flash player for browsers that don't support the video tag. This happens on IE and some older browsers. I need to detect if the Flowplayer exists on the page and add an event listener to each instance that fires off a J...

ASP.NET 2.0 TreeView - OnSelectedNodeChanged does not fire in an User Control

I have a small User Control defined as: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CompanyTree.ascx.cs" Inherits="RivWorks.Web.UserControls.CompanyTree" %> <div class="PrettyTree"> <asp:TreeView runat="server" ID="companyTree" OnSelectedNodeChanged="SelectedNodeChanged" ...

Getting error code from GetEventParameter

Here is a snippet of code I have to handle smooth scrolling. here is the output of the NSLog: 2010-06-21 16:04:10.524 PDFViewWXOSX[80161:a0f] first error: -9870 2010-06-21 16:04:10.525 PDFViewWXOSX[80161:a0f] second error: 0 2010-06-21 16:04:10.552 PDFViewWXOSX[80161:a0f] first error: 0 2010-06-21 16:04:10.553 PDFViewWXOSX[80161:a0f] se...

How to raise an event in C# - Best Approach

Hi, I am writing a Windows Form application. It has a thread to perform some operation and when the operation found something it has to notify the main form to change a control. Currently the notification uses the C# event hadling described in the following MSDN page: http://msdn.microsoft.com/en-us/library/wkzf914z(VS.71).aspx But I a...

Raising an event from inner class to be handled at outer class, How to Do ?

I have a class A, B class A { public class B { public event EventHandler handleClick; public void eventraising(object sender, EventArgs e) { if (handleClick != null) handleClick(this, e); } } //handle raised event...

Why is there an OnResizeBegin for Forms, but not Controls?

The title pretty much says it all. A Windows Form is a type of Control, and Controls are UI elements that have a Size property along with size-related methods such as OnResize and OnSizeChanged. But Forms also have OnResizeBegin (and OnResizeEnd), which are not found in Control. Is this omission an oversight, a prescient design decisio...

How to detect end of Right drag of TControl ?

edit: VCL has no problem around right dragging and the sample program below works perfect. A mouse gesture utility causes the problem. (Perhaps it hooks & intercept WM_RBUTTONUP event...) I want to detect end of right-dragging on the control. For left-dragging, I can use MouseUp event, but it doesn't occur after right dragging. On th...

How to handle Android trackball events from a web page?

Is there any DOM event in Webkit associated to trackball events (movement and pressing)? Or is there any other way to handle those events from a webpage? ...

wxPython App - Ensure All Dialogs are Destroyed

I'm working on an application that will need to use a variety of Dialogs. I'm having trouble getting events bound in a way that ensures that my Dialogs are destroyed properly if someone closes the application before dismissing the dialogs. I would expect to use something like this: class Form(wx.Dialog): def __init__(self): wx.Dial...

Tk: Event for entering with mouse button held down

I'm writing a video game mapping program in Ruby that has uses Tk for GUI. To give you some background, the level map ($Map) is a large TkCanvas covered with TkcImages - one for each tile in the level. I wanted to set it up so that the user could edit the level by clicking and dragging the mouse around to paint tiles. So I figured I c...

How to attach event handler to an event using reflection?

I know about EventInfo.AddEventHandler(...) method which can be used to attach handler to an event. But what should be done if i can not even define proper signature of the event handler, as in, i don't even have reference to the event args expected by the handler? I will explain the problem with the proper code. // Scenario when i hav...

iPhone: UIControlEventTouchUpInside fires multiple times...

Hi, ** solved... see explanation on bottom ** can anybody give me a hint about highlighting a control in response to UIControlEventTouchUpInside? What I want to achive is the highlight effect similar to UITableViewCell, when touched. In the following code I change the alpha value of a highlight view when the user touch up inside the c...