event-handling

WPF WebBrowser Control - no LinkClicked event

Hi there Does someone have know how to trap clicks on Links in the WPF WebBrowser Control? I need to get the links target, when the link is clicked, before the Page is navigating. Any inputs highly appreciated! My solution in Code As proposed for simple Links this would be achieved with the following code: private void webBrowser1_N...

CheckedChanged EventHandler of dynamically added Checkboxes not firing inside UpdatePanel of a Repeater

Hello! I´ve read most posts here but i can´t figure out why the "CheckedChanged" Event is not firing. Here is my situation. I´m using a Repeater to generate Items out of a Database. Each ReapeaterItem should include an UpdatePanel, because i have to Update the Controls inside the UpdatePanel and do not want to reload the complete page....

One Liner: WeakReference-to-a-Lambda Event Handler

Hello, Can you see downsides to this one-liner other than the fact that multiple uses of it would violate the DRY principle? It seems straightforward but the fact that I haven't seen others propose it makes me wonder if there's a downside to it. This bit of code creates a WeakReference to a method and then registers an event handler th...

Android, WebView, 'onlick' inconsistent firing

In my JavaScript code I set 'onclick' handlers on HTML DOM elements. In Froyo these handlers always 'fire' when their elements are clicked w/i WebView, as expected. In pre-Froyo, including 2.1 I am confronted by 'magic' :-( Sometimes the handlers are activated and they successfully log to console.info as well as call Java callbacks, some...

Handeling Multiple TimerEvent

Below is simplified version of a game I am creating. Basically, the game have some circles. Each circle shoot bullets that is dispatched with timerEvent. When the circle is clicked it is removed from the stage. However, the bullet still keeps on dispatching. I couldn't figure out how to stop timerEvent of each individual circle when it i...

Do I have to manually remove all event handlers for each instance??

Consider this class: Class Item : Inherits ItemBase Public Sub New AddHandler MyEvent, AddressOf MyEventHandler End Sub Private Sub MyEventHandler() End Sub Private Sub MySecondEventHandler() Handles MyBase.MyEvent End Sub End Class Do I have to manually remove the handlers on destruction of thi...

How to use the same function for both a Timer event and Mouse event in AS3?

Hi everyone, so today my question is how can we have 1 function triggered by both a Timer event and a Mouse event? 'm trying to avoid having to re-write/re-name a function just because I also have a Mouse event that triggers it and not just a Timer event. Issue: I have a addThis bubble fade in with icons on a button rollover, the addTh...

Weird click event behavior in IE8 with prototypejs 1.7_rc2

I have some javascript click handlers that don't do what I want in IE8. What I want to do is call a handler on the first click and then call another handler on all subsequent clicks. The way I do that is put the original handler in the onclick attribute and then use that handler to erase the onclick attribute and use Event#observe to set...

global custom events in jQuery

I want to use custom jQuery events independent of DOM elements, but I'm not sure what the best way is to achieve this. Here's what I started out with: // some system component registers an event handler $().bind("foo.bar", handler); // foo is my app's namespace, bar is event name // another part of the system fires off the event $().tr...

How to know where javascript method is defined and which method is called using firebug

How can we know which javascript method is called and where it is defined? (When methods are attached dynamically) Let us consider situation where JQuery Bind method is used to bind an event. If I see control in FireBug with FireQuery, I can see events=Object{click =} handle=function() But I don't know which method is attached with click...

Click event handler with Custom Control Button

I'm creating an ASP.NET Custom Control for my web application which is basically an ASP.NET Button control contained inside multiple <div> elements (for styling purposes). How can I create a Click event handler for my custom control so that my control acts as an ASP.NET Button? Ie. <cc:Button id="myButton" runat="server" Text="Submit"...

Handle ALL events in one handler?

Is it possible in VB.NET to easily write an event handler that will handle every event that fires? I'm wondering if one could make a logging system using something like this. I'm wanting to do something like (in pseudocode): Public Sub eventHandledEvent(ByVal sender As Object, ByVal e As EventArgs) File.Write(sender.EventName) End...

completing example of CMMotionManager example listing 4-9 and 4-10

http://developer.apple.com/iphone/library/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/MotionEvents/MotionEvents.html listing 4-9 and 4-10 i tried to run the code but with no success, i run into a problem with gyroHandler. can someone post an example of a completed code, without much changing the sample listings? meaning...

C# Disable Event Handler Problem

i am using textchanged event and i disable it where i don't need as following object.Event -= new System.EventHandler(myHandler); //my code which doesn't need event handler object.Event += new System.EventHandler(myHandler); i used many times like this. but i needed sometimes 2 disable code like this: object.Event -= new System.Event...

Event Capture in classic ASP (vbscript) - is this possible?

We have just purchased some software that provides an API into our phone system allowing us to dial, hangup etc.. The API was designed to be used client side (internet explorer / activex). We want to use this server side and execute the dial commands via an ajax call to a classic ASP script. The basic VBScript for initialising the co...

How are the Poco C++ events handled?

Lets say i have a Poco::Thread: Thread Parent has an eventhandler method within it. The parent then spawns two children threads, who are given events that are the parent subscribes the eventhandler to. So two events both have the same event handler attached. If Child A triggers their event, and Parent starts to execute it, what would hap...

How can an java event listener defined as an anonymous inner class use a variable from an enclosing class?

Here's the code: protected Dialog onCreateDialog(int id) { Dialog dialog = null; if (id == DIALOG_SEARCH) { dialog = new Dialog(this); dialog.setContentView(R.layout.search_dialog_layout); dialog.setTitle("Search Dialog"); Button button = (Button) dialog.findViewById(R.id.Button01); final ...

How to catch event when an item in a BreadcrumbBar is clicked?

I'm testing BreadcrumbBar from Vista Bridge Library. My very simple demo project is here (using latest version 1.4 at the moment). As we know, when clicking an item (on itself, not on the small breadcrumb on its tail), all the items on the right will disappear. I want to pop up a message box when that happens. How can I do it? ...

Is there any way to prevent a WPF CheckBox from firing its Checked event?

I have a group of WPF CheckBoxes that have a Checked event handler that handles some logic when the user clicks on one of them. However, I also have a "Clear All" button that, when clicked, will clear all the checkboxes. If the user clicks on the "Clear All" button, I do NOT want the checkboxes to fire their Checked event. Is there a way...

Handles keyword dissapears on control cut/paste

When I cut some controls in designer window and paste them in some other container, handles keywoards dissapears from code. If I have btnOK on form and click event handled like this: Private Sub btnOK_Click(...) Handles btnOK.Click and then in designer I cut the button and paste it somewhere else, Handles part just disappears, living...