events

jquery click event is overridden when new object is created

I am writing an Ajax application which uses a callback function to add a card to a players hand. the object is created correctly and the menu for each object is also created correctly. when created the DOM object, in the callback function i use to add the object, i have some code like this: $("#card"+cardNum).live('click',function(){ ...

Single click edit in WPF DataGrid

I want the user to be able to put the cell into editing mode and highlight the row the cell is contained in with a single click. By default, this is double click. How do I override or implement this? I've searched on google, and the codeplex answer doesn't work for me. I'm pretty new to WPF and coding in general, so a simple answer is b...

UIScrollView still receives scroll events underneath a UIButton

I have a full-screen UIButton to capture all touch events, so that the scrollView underneath doesn't scroll. However, for some reason, it's not working. Can someone tell me a way to create a view that will capture tap and swipe events so this won't happen? Thanks! ...

Way to differentiate Click from DoubleClick

I have in a panel a GDI drawing with some objects. When the user clicks on one object, this object should be selected, if doubleClicks on it, a new pop-up (properties) window should open. Now, I overrided OnMouseClick => obj.Selected = Not obj.Selected OnMouseDoubleClick => (New Properties(obj)).ShowDialog() The problem is that when t...

Does an event need to have at least one handler?

Why event needs to have at least one handler? I created custom event for my Control and somewhere inside of code of my control, I call this event: this.MyCustomEvent(this, someArgs); it throws a NullReferenceException if there is no handler subscribed to it. When I added a single handler in control's constructor, everything works...

jQuery live() and Internet Explorer

I have select inputs dynamically added to form by $(selector).append(html) I'm using live('change',handler) to bind change event for all selects. The problem is that code is fine in all browser, except Internet Explorer (all versions). I've replaced live() with the plugin livequery() still working in all browser and i have strange b...

Webbrowser control document_completed fires more than once

Hi, The event of document_complete fires more than once. Which isn't really that bad. But the url i'm navigating to, never gets completely loaded. It gets fired like 2/3 times. This is my document_completed event: private void webBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { if (e.Url.AbsoluteP...

Attach a close event to a div that already has fadeOut attached to it

Hi, I implemented the "growl" popup example from the book "jquery: novice to ninja", basically it shows a growl style popup in your browser which can be closed by clicking on a "close" link in it. The code works great but I want to improve it by having the popup fadeOut after some time IF the user never clicked on it to close it (it ca...

Flex/Flash Event Question..

Hi guys.. I am trying to get the event data in a event handler..my debugger image is as follow: I tried to dispatch my custom event with the event.data please see onPlayerError function... My debug shows my data value is -1 but the compile said "access of undefined property data throught a reference with a static type flash.events....

How do I listen for specific button presses, and home view user interactions?

My application listens for user input from the touchscreen and the buttons, but I would like to listen for interaction with specific items in the homescreen view. So, for example, I need to listen for the user to tap the menu button, and then to produce output. Is there a paramater I can pass through the onClick() class? Or do I need ...

Windows Logoff Event c++

Hello, I need to catch windows logoff event, I'm using c++. I dont know where to start searching, thanks for any help, Dani. ...

How attach an event to a method in a common class?

Say i have the following two classes: public class User { public int ID { get; } public string Name { get; set; } public void ChangeName(string newName) { Name = newName; } } public class Mail { public void SendUserInfoChangeEmail() { t...

AS3 Simple Event Questions....

Hi guys.... I am trying to get the percentage x coordinate of a MC. For example, My MC is 500px wide and 20px height. When I clicked the part of my MC, I want to get the percentage of my MC' x coordinate... (20% will be 100px of my MC...)..Anyone knows how to do it?? Thanks.. my code progressBa.addEventListener(MouseEvent.CLICK, bar...

When to extends EventDispatcher

Hi guys.. Simple question..I was wondering when you guys extends EventDispatcher in your class. It seems to me that as long as we have import event package, we can dispatchEvent without problems....I saw sometime people extends EventDispatcher in their class...not sure why...anyone care to explain? Thanks a million... ...

Actionscript 3 - Youtube API questions......

Hi guys... I am trying to build a as3 only search api project.. I am checking this guys's code here... http://blog.martinlegris.com/2010/05/28/sample-code-using-the-youtube-as3-api-with-the-youtube-player-api/ He has following code... protected function doSearchResults(evt:VideoFeedEvent):void { if(_requestId == evt.requestId) ...

Trying to understand the event aggregator pattern

I am trying to implement the event aggregator pattern in a simple way to learn it step by step. But i didn't find any book or nice video tutorial talking about it's implementation. I just found some good articles such as this http://weblogs.asp.net/rashid/archive/2009/03/05/use-event-aggregator-to-make-your-application-more-extensible.as...

Changing page contents on postback

I have a survey, where you have to click through several pages with questions. I use a "Next" and a "Previous" button for doing this. I use a session for keeping tabs on my position. However, this is a problem. I use the button_click event to increment the page counter, but since this fires after the page_load event, nothing happens on ...

How to disable the onclick event once it happens?

I had a image which calls add_cart() javascript function when onclick() <img src="images/add.png" onclick="add_cart()"> I want the user to click the image only one time. When the user clicks it first time, add_cart function should be called. If he clicks second time NO EVENT SHOULD HAPPEN Plz help, any help will be appreciated ...

TextBox.TextChanged event firing twice on Windows Phone 7 emulator

I have a very simple test app just to play around with Windows Phone 7. I've just added a TextBox and a TextBlock to the standard UI template. The only custom code is the following: public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); } private int counter = 0; p...

Membership and event API? Or should I do it myself?

I've been tasked with setting up a society's website. I'm a full time Django (at al) web developer so I was happy to take on the task. Going through the specs, they want to control memberships so that all applications need a "second" (read: sponsor, referee, etc) and then they need to pay a subscription fee to be part of the club. Thi...