events

Adding custom code to mootools addEvent

Even though I've been using mootools for a while now, I haven't really gotten into playing with the natives yet. Currently I'm trying to extend events by adding a custom addEvent method beside the original. I did that using the following code(copied from mootools core) Native.implement([Element, Window, Document], { addMyEvent:funct...

GWT FocusPanel, tab key and focus handlers

I'm implementing a custom widget extending Composite and implementing Focusable and HasFocusHandlers. The widget contains two widgets in a panel that I wrap into a FocusPanel that I use to initialize the widget. My constructor looks something like that: public CustomBox() { panel = new VerticalPanel(); ... panel.add(caption...

Android AppWidgetProvider and BroadcastReceivers

The online android documentation says: Everything you can do with AppWidgetProvider, you can do with a regular BroadcastReceiver. So, what i want to do is to register via registerReceiver() another event other than ACTION_APPWIDGET_* on my Widget. For example ACTION_BATTERY_OKAY, is there any way to do this? Obviously i cant regist...

Is there an ASP.NET textarea onkeyup equivalent?

Hi, I've got an asp:TextArea that I would like to do some processing (filtering a list) as the user types. I'm sure I could do the filtering within a javascript function called via the onkeyup event, but I'd prefer to do it in my VB.NET code. Is it possible to do such a thing, or should I just stick with the Javascript? If the latter, ...

Add f# function as event handler in xaml

Does anyone know how to add an F# event handler to a control in the xaml file? ...

how to handle incoming call events in Android

Hi there Does anybody know if there is any event to handle incoming calls?? I'm developing an app that streams audio from the microphone and I would like to have a listener that stops the recording, etc when there is an incoming call...and that restarts the procress when the telephone call is over. Thanks in advanced ...

Why and when using Events ?

Hello everybody In my personal project ,i have never used Events.I have never feel it neccesary.Especially using Events create some problems about restriction on methods with same parameters and this is why i haven't used it any.What is benefit of using it ? When time and where we need it ? Edit: Using Events is more for closed source ...

Class name change Event in jQuery

Hi, Is there a way to trigger a event in jQuery when an elements classes are changed? Examples: <img class="selected" /> into <img class="selected newclass" /> triggers an event And <img class="selected" /> into <img class="" /> trigger an event ...

How can I attach a mouse event to a Run object in Silverlight?

I can attach a mouse-click event to a TextBlock object like this: TextBlock tb = new TextBlock(); tb.Text = "click here"; tb.MouseLeftButtonDown += new MouseButtonEventHandler(tb_MouseLeftButtonDown); But I would like to instead attach the mouse-click to individual Run objects inside the TextBlock object so that various parts of the T...

NHibernate ISession specific event listener

Hi, I'm creating a multi-tenant ASP.NET application using NHibernate (shared schema). I had intended to use NHibernates Event Listeners to inspect/modify entities prior to saving to ensure that the current tenants ID was being saved against the entity. The authentication token containing the tenant ID is managed higher up and passed do...

How do I hook another applications events?

I'd like to hook the event that is triggered when an application is trying to notify you of something (when its icon background turns orange and starts flashing) so that I can create my own custom notifications (like getting a text message or email) For example I'd like to have an event triggered when I receive an instant message on my...

Trapping a post data binding event for Silverlight

I have a series of controls that are created at run-time and then added to my Silverlight application layout grid. I was wondering if there was some sort of event that I could trap AFTER data binding has occurred. I would like to do some post processing on the controls after data has been bounded from the DataContext. I have implemented...

Binding event to text node

Here's my HTML. I need to bind a click event to "someText" <div id="container"> someText <a href="#">A link</a> </div> "someText" could be any string of text ...

Click events in a jQuery Dialog occur twice?

Hello, I have been dealing with an odd problem that .click() events happen twice whenever placed in a jQuery Dialog. My simple test case is below and a live example is here <div id="popup" style="display: none"> <a href="javascript:void(0);" id="testlink">Test Link</a> <script type="text/javascript"> $('#testlink').cli...

How do I detect touch input on the Android

Right now all I am trying to do is detect when the screen is pressed and then display a log message to confirm it happened. My code so far is modified off of the CameraPreview sample code (it will eventually take a picture) so the bulk of the code is in a class that extends SurfaceView. API for the example code from the SDK is 7. ...

An event delivery library in Java?

Hi, I'm looking for a library that will allow me to deliver simple text events from the server to the clients via sockets. Something simple and lightweight. I can write it myself, but decided to check if such thing exists first. The idea is that there's an application that generates events (such as order rejected or an internal error occ...

Stop jQuery from calling next events

I write a jQuery plugin the first time and I'm wondering if there is a way to stop jQuery from running the next attached events. Example: $(this).submit(function(){ return $(this).do_some_validation(); } If validation didn't pass (i.e. the function returned false), the form should not be submitted, but if there are any other even...

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 ...

Benefits of events using EventArgs/EventArgs<T> delegate types instead of…

I understand the benefits of events using delegate types with signature delegate void delegate_name(object sender, EventArgs e) a) But besides the fact that it may save us some typing, are there any other reasons why we should use already defined delegate types EventHandler/EventHandler<T> instead of declaring our own delegate types wi...

Character Counter Super Slow - jQuery

I wrote this: $('[name=item-title]').live('keyup',function(k){ char_limit=parseInt($('[data-charlimit]').attr('data-charlimit')); total = char_limit-parseInt($(this).val().length); $('.charcount span').text(char_limit-parseInt($(this).val().length)); }); But after the first few words it starts going super slow where I'll t...