events

Getting the ListView ItemCheck to stop!

Following some SO advice I have tried the following on the ItemCheck event of a ListView control: private void lstTasks_ItemCheck(object sender, ItemCheckEventArgs e) { ...some code return; } The idea being that that return; will cancel the event ...but does running some code before the blank return; negate the de...

Read out JavaScript onClick function body and use it for another onClick

Hello, I try to copy an onClick function from an image to an span object. But I don't get it. I have tried it directly with onClick=img.onClick, onClick=new Function(img.onClick) and more. if (img.onclick != undefined) { var imgClick = img.onclick; strNewHTML = strNewHTML + " onMouseOver=\"this.style.background" + "= '#cec...

Capturing Adobe Air keyboard events in new window

This is sufficiently important to me that I'm opening the question up to a bounty with a simple goal: Can anyone successfully open a new, full-screen NativeWindow in AJAX Air and, from that window, detect key strokes? Hopefully I'm just overlooking something really, really simple, but if JS is not capable of listening for keyboard even...

EventHandling in GWT with LayoutPanels

Hi all I have some questions regarding GWT (2.1) with MVP and events. Got DockLayoutPanel with some components in it. A Tree component to the west and a SimplePanel in center. Each component has a presenter and a view. The problem is that I want to handle the components events in their presenter class, but now they are only catchable ...

lazy event publish subscribe in python

I need an event messaging system in my google app engine application. and i was referring to following python library. http://pubsub.sourceforge.net/apidocs/concepts.html my question is , is it must that the listener function i want to execute must be imported ( or exist otherwise) somewhere in to the execution path in order to run it...

Attach command with parameter to KeyUp event

Hi, I am currently transforming a medium size WPF project to MVVM and I ran into a problem that I wasn't able to solve, yet. Maybe you could help me out? The target framework is .NET 3.5.1. I have a list view that gets its items from the underlying view model. That view model is exposing a command to remove the selected items from the...

javascript catch paste event in textarea

Hi, I currently have a textarea which I requires control over text that has been pasted in, essentially I need to be able to take whatever the user wants to paste into a textarea and place it into a variable. I will then work out the position in which they pasted the text and the size of the string to remove it from the textarea, The...

event filter on QGraphicsItem

Is it possible to have an event filter on a QGraphicsItem? eventfilter has a param that gives you a QObject, but since QGraphicsItem isn't derived from QObject, then how would it work? ...

Why is the Binding Format event called twice?

I am playing around with data binding and noticed that the Binding Format is called twice upon loading the form in the code below. I thought it would only happen once when the test class TextBoxText property is fist bound to textbox1. Is this normal? If not, then what can I do to prevent it? Note, when I press button1 and it changes t...

When to use EventListenerList instead of a general collection of listeners

When I learned how to fire events in Java, I became familiar with EventListenerList. When I create my own listeners, I write the listener so it extends EventListener, I store them in an EventListenerList, and my fire method would go through the event listeners like this: protected void fireChangeOccurred(Change change) { Object[] li...

Registration in Drupal Sites

I am making a drupal site and have a custom content type Event. I want user be able to register themselves at the event page. For this there is a module namely Event Manager . But this module is not present Drupal 6.x release. Is there some other workaround of this? ...

BlackBerry calendar event list returned by PIM sometimes is empty

This problem is related to PIM package on BlackBerry SDK. I need to update calendar events on the device after synchronization is done. To check if new event is really new I do this call: EventList eventList = (EventList)PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE); Enumeration events = eventList.items(EventList.OCCUR...

How can I detect any key pressed (numeric, alphabet) event in Android for EditText

I have inherited EditText class an made my custom class, MyEditText. and want to detect key pressed(say 'a', 'b', 'c'... '0', '1', '2'... etc.) event in Android. How? It seems overridden method onKeyDown(int keyCode, KeyEvent event) is called when 'back', '\', '/', 'DEL', '@' keys are pressed, but not for any numeric or alphabets. ...

When will the CanExcute event be raised by the CommandSource

Hi, When will the CanExecute event be ideally raised by the control that realizes the ICommandSource interface?? I tried to add a breakpoint to the handler to check when it is getting raised and it seems to be executed whenever the control is rendered on the screen. Can someone explain when exactly it will be raised and how to raise ...

How to implement sequntial iteration with asynchronous code

I want to implement sequential upload of files (with XMLHttpRequest level2) to server. Got bunch of DOM elements with File attached (FileAPI - W3C draft). I want to upload in sequence (one after another), but XMLHttpRequest works asynchronously. Little code sample: $thumbnails = $('queue').find('.item'); for (var i = 0, len = thumbnails...

Modify Object Access properties via C#

After viewing my Security Event logs on Server 2003 I have noticed that an event is logged with a failure audit. The category is Object Access, with the following Accesses being required: READ_CONTROL SYNCHRONIZE ReadData (or ListDirectory) WriteData (or AddFile) AppendData (or AddSubDirectory or CreatePipeInstance) I ...

How to handle events of members from another class/instance

I am attempting to share a sub menu among several different parts of an application so that it is consistent (not wanting to copy/paste.) I thought it would be simple. I am doing something like this: public class MyClientClass Private WithEvents ctx As ContextMenuManager = New ContextMenuManager Private Sub handler() Handles ...

jQuery .data vs eventData

When setting up a event handler (submit, click, keypress, whatever) what is the fastest and most efficient way to get data to the handler and use it in the handler? Should I be doing something like: $obj.data({name: value, ...}); $obj.click(function(e){ var $this = $(e.target), name = $this.data(name); }); Or is it better to do...

Best practices of using lambda expressions for event handlers

After discovering lambda expressions, and their use as anonymous functions, I've found myself writing a lot of more trivial events such as these: txtLogin.GotFocus += (o, e) => { txtLogin.Text = string.Empty; txtLogin.ForeColor = SystemColors.ControlText; }; txtLogin.LostFocus += (o, e) => { txtLogin.Text = "Login..."; t...

TextBox Event Small Problem - C#

Hello again. I have a small problem which I'm having a hard time troubleshooting. I just wanna hear some inputs from you guys. I have like maybe 8 textboxes which all uses the same TextChange Event shown below: private void TextChangeUpdate(object sender, EventArgs e) { if (this.Text.Trim() != "") { ...