event-handling

How to GET (not set) the focus in a J2ME Form?

This helps you to bring focus to a specific textfield: yourMidlet.getDisplay().setCurrentItem(tField); But what method can be used to findout if the focus is on a specific textfield? I excpect something like if(yourMidlet.getDisplay().getCurrentItem().equals(tField)) { ... ...

Can AppleScript listen for events?

I want to write a script that takes action when a document is opened on a certain application, or before an application quits, etc. Is there a way to attach a script to an event in an application? Does AppleScript support any form of hooks at all? If not, can I hack my way into getting what I want? ...

How to prevent JQuery change event from triggering when select's HTML is changed?

I have a select element that has a change event attached so that, when the user selects a new option, that text is placed into a corresponding input element. That's working fine: $("select[name='" + dropdown_name + "']").live("change", function() { text = $("select[name='" + dropdown_name + "'] option:selected").text(); $("#" + ...

Iphone event handling

Dear friends hi to all i am new to iphone development i have doubts in event handling , i wonder how to handle event for the view which having various subview ,imageview etc bacause if i made touchbegin evnt all the touches made in that view will be refelected how can i find where the touch come from that view (for eg its from Views o...

Chainable keyboard handlers in Swing

I have a custom component subclassed from JPanel, with a keyboard handler. My main application embeds this inside another JPanel. Now I want the parent JPanel to also respond to keystrokes, since there are some actions that need to be taken only when the component is focused, but which apply to the app as a whole, and not that component...

Help understanding a C++ sample app which uses global mouse event hooks?

I'm trying to understand and implement the sample presented in this MSDN forum thread. The sample involves implementing a global hook to catch mouse movement and click events, and act on them under certain circumstances. I know C# pretty well, but I don't know C++ enough to understand what this sample code is doing. The contributor of ...

event.COMPLETE handler question...

Hi guys. I want to dispatch a custom event when the two files are downloaded or uploaded successfully. I use fileRef.addEventListener(Event.COMPLETE, completeHandler); fileBigRef.addEventListener(Event.COMPLETE, completeHandler); to listen the complete event with only 1 handler. function completeHandler(event:Event):void{ var ...

How to properly forward UITouch events in responder chain?

Hi there, I'm struggling with following problem. I'm having a view controller with scroll view. With this scroll view, user should be able to swipe through set of "pages" - like in apple's weather app, so nothing uncommon. Then each "page" within the scroll view is table view, showing a list of items. And here I'm getting into the probl...

Windows Mobile Click Handler doesn't work

Hi, I have an urgent problem..I am developing a windows mobile 6.0 application and the menu item key (which I putted on left side to serve as a back button) only fires when I double click it or after several one clicks..but the items on the right side which in a menu works fine.. I see on the screen that it is clicked(phone vibrates)...

What is the best way to handle multiple key events in Javascript?

Pressing space bar in game will make a character shoot, pressing space bar when a confirmation box is shown will make this box disappear and pressing space bar in a highscore form will add a space in an input box. In this example there are several events for the same key, but only one is fired at a time. Is there a general (or specific ...

Add an event handler to jqGrid after instantiation

I want to add an event handler to jqGrid (for the onSelectRow event) but after the grid has already been created on the page i.e. I cant hardcode it into the initial jqGrid definition. I have tried using setGridParam to set an event handler for onSelectRow but that didnt work :( $('#list').jqGrid('setGridParam', { onSelectRow: functio...

How do I create a base page event that fires after the derived page's load event?

How do I create a new event in a base page class that fires after all derived pages have fired their load events but before any controls fire their load events. The following code fires the event before the derived page's load event. I want it to fire the event after the derived page's load event but before all control load events: Bas...

C# databinding of class variables.

Hello All, I'm really falling in love with the whole .Net databinding scheme... but apparently there are still a couple of gotchas out there. Let's say that my class has a member variable of type double named Susan. Well there seems to be no immediate way to bind Susan to a text box SusanText because the binding looks something like t...

How does order matter in .NET delegate concatenation?

Here's the situation. I'm reviewing some SDK code that I didn't write because I've been tasked with drafting the developer's documentation. In one class, in the constructor, event handling is set up like this: _engine.ReceiverEvents_OnPosition += OnPosition; _engine.ConnectionEvents_OnDeviceStatus += OnDeviceStatus; _engine.ConnectionEv...

ASP.NET/HTML: HTML button's onClick property inside ASP.NET (.cs)

Hi, I just wanna find out if there's a way to put my onClick event inside .cs: <button type="submit" runat="server" id="btnLogin" class="button" onclick="btnLogin_Click();"> where Login_Click() should be inside .cs: protected void btnLogin_Click(object sender, EventArgs e) { // do something } Please do take note that I will n...

Does performance of an event handler depends on the number of child elements

I've got a single mousedown event handler on a table with dynamically increasing number of rows (right now over thousand, in perspective should have been unlimited) and I observe a drop down in performance as the number of preloaded rows increases. The purpose of event handler is simple - figure out which row was clicked and highlight it...

Cocoa - How to get Mouse Down Events when mouse isn't Dragging?

Hi all, Cocoa, Mac OS X 10.6. My app (a game) needs to determine if the mouse is down within a view, repeatedly, even if the mouse position doesn't change. The problem: mouseDown will only be called the first time the mouse is pressed and held down. If the mouse is not moved at this point, mouseDragged is not called, and no more mou...

Need help in Event Handling

I have a delegate delegate string Mathop<T,F>(T a,F b); and I am declaring an event like event Mathop<T,F> someevent; But here I am getting an error. It says 'T' could not be found. I want my Mathop delegate to work as an eventhandler for my event. What I am doing wrong here. ...

my program exits from close button of window but not from my exit button.help me i have used System.exit(0).tell me another way.

Here's my code: import java.awt.*; import javax.swing.*; import java.awt.event.*; import javax.swing.table.*; import javax.swing.JOptionPane; import java.util.*; import java.applet.*; /*<applet code=tabledemo.class height=300 width=300></applet>*/ public class tabledemo extends JApplet implements ActionListener { JScrollPane jsp1; ...

Event handler not removing itself?

At the beginning of a VB .NET function I remove an event handler and add it again at the end of the function because the function's code would trigger those events and I do not want them to trigger for the duration of the function. This usually works, but I have run into a few situations where the event still gets called even though I h...