events

Input value problem when to fast typing

$("#input").keyup(function(){ console.log($(this).val()); }) Problem is when one is typing slowly "a" & "b" the above code will result in "a","b" in console log. But when somebody does it quickly the result is "ab","ab". It's easier to do with letters which are near on a keyboard eg. "e"&"r". How to avoid it? Events keydown and keypr...

Flex - cancel a change event on a Tree

Hello there, Brief details: I'm using Flex 3.5. I have a Tree component that's used as a navigation menu between different 'pages'. When the user clicks a certain option in the menu, I switch the 'page' by switching between State components in my application. The thing is that when the user indeed clicks an option in the menu, I want t...

Read event log in C#

Hi, I'm trying to read event logs for my application EventLoggingApp. The problem is reading logs for my single source (EventLoggingApp). This code read logs for every source. What is the problem? Any advice? static void ReadEvenLog() { string eventLogName = "Application"; string sourceName = "EventLoggingApp"; string...

Prevent onclick when ondblclick is triggered

Hello, stackoverflow world! I have h:panelGrid, containing some elements. I want to trigger an action when user clicks it and I want to trigger another action when use double clicks it. I have the following code now: <h:panelGrid ...> <a4j:support event="ondblclick" actionListener="#{page.doubleClicked}"/> <a4j:support event="onc...

How to receive a event on android checkbox check change?

what would be the correct way of receiving and sending a event when a check box get's enable or disable. In c# i could just easily double click and all the code would be done for me. but in android it appears to be a bit more obscure. i thought of using the touch event handlers but then if the user has a keyboard it wont detect the chang...

How to prevent value changed events from firing on form initialization VB.NET?

Consider a simple VB.Net form with a couple radio buttons and a checkbox. Each of the radio buttons has a CheckedChanged hanlder setup that performs some action based on the state of the checkbox. My problem is, when I initialize on the default radiobutton to be checked (from the designer properties window) the CheckedChanged event is ...

ASP.net server event handled client-side

I was wondering if anyone had an easy way to wire up javascript event handlers to events happening on the server-side. I have a long running process that includes a lot of steps, and would like the client to be continually updated with new information as the steps transition. Will this involve some sort of polling mechanism? ...

How to do an action only when there is no default in Javascript / jQuery ?

I'm asked that a click anywhere in a div does a specific action (say collapse it) unless the click was on a link, a button, etc... Basically, I'd like the reverse of event.preventDefault(). Is there a good and easy way to do this? I'm looking for a generic solution here; I would like to not assume much about the content of the div. M...

mismatch of event coordinates and view coordinates in Android?

I've been trying to write a little application that recognizes custom events in Android: you hold your finger over a TextView for a certain length of time, and it changes color. I'm using the MotionEvent coordinates and checking if they are within the bounds of a particular TextView, which is within a table. private boolean checkBoun...

Event Handling from a custom ItemRenderer event in a DataGroup

I have a MXML application with a DataGroup as follows: <s:DataGroup id="productSelector" dataProvider="{products}" itemRenderer="renderers.ProductLineupRenderer" > <s:layout> <s:HorizontalLayout/> </s:layout> </s:DataGroup> I want to know when items in my itemRenderer are manipula...

Does Events in java are treated in a separated thread or I have to do it myself?

Im pretty new to programming....so I am making a music Player that needs some features I need to treat one Event at the same time in 2 classes. For example... The Player is plaing music on its own thread, when this music is done, it fires musicFinished(MusicEvent), go to the Playlist class and asksForAnotherMusicToPlay(), then starts pl...

Querying the list of event listeners registered for a given event type

Is there a way to identify the list of registered listeners for a given event in javascript, if so can you please list out the sample? ...

Click event for controls below other controls

Hello, I have two controls A and B. Control B is placed over A. When B is clicked only it's clicked event is fired, however I need the click event of A to fire too. Can this somehow be realized using routed events? Here's a screenshot of the controls: Of course this case is just a reduced example, I'm looking for a general way to ra...

Delphi DLL - TClientSocket events.

I have a DLL with a TClientSocket component, it is used to talk to a Telephone System Machine. The DLL only have PChar parameters in the exports methods, and is not using packages. When I load the DLL with Delphi app, all the events works fine, no problem so far. My customer is calling this DLL from a console Win32 Cobol program, and t...

Event handler loop intersecting Stream run-loop

Hi all, I am trying to make a socket server that spews mouse move events, in Cocoa. This thread: http://stackoverflow.com/questions/3134901/mouse-tracking-daemon has info regarding the mouse event handler, which was really helpful, however, I need to stream these events out via socket. Using http://developer.apple.com/mac/library/doc...

How to wait for an other process to start listening on a local port?

I have a test driver program that launches a separate test server process. The test server process listens on a local port, and after it's ready, the test driver runs a test that accesses the test server. Currently the test driver repeatedly tries to connect to the local port (loop some, sleep some, try again). It's not an optimal solut...

How to prevent delegated handlers on a parent without preventing default in jQuery?

Is there any way to prevent a click from an <a> triggering delegated click handlers on its parent, while allowing the the <a>'s default behavior to occur (navigating to the href). Here's an example that illustrates what I'm asking. <div class="top"> <div class="middle"> <a href="google.com" class="link">link</a> </div> ...

How to handle wpf datagrid MouseMove event in viewmodel...in MVVM pattern?

HI, I have a wpf-datagrid in view, i am following mvvm model...so no code in "codebehind". I wud like to handle "mousemove" event in viewmodel..how do i do this ? ...

Java Swing: keeping the event handling maintanable

In my current project we are using for our Swing client the following patterns: Business Object (POJO) <--> (mapping) <--> Presentation Model (POJO with property change support) <--> (binding) <--> view components Everything is fine and works the way we are expecting them to behave. BUT, we encouter those problems when view begin to ...

nhibernate auditing with events on update

The following code works on insert but on update modifier is never set, any ideas why? The code for pre-update is being run and correctly sets the state and entity values to the desired value. However when viewing the generated sql nhibernate does not include the field in the update query. /// <summary> Updates auditable objects </summ...