custom-event

Firing an event / function on a property? (C#)

I am using a class that I cannot edit, it has a property (a boolean) of which it would be nice to be informed when it changes, I can't edit the properties get or set as I am importing the class from a .dll (which I don't have the code for). How do I create an event/function that is fired when the property is changed? Additional It is o...

ASP.NET TextBox LostFocus event

I need to trigger code on the server side to be called when a TextBox loses focus. I know there is the onblur client side event, and that there is no LostFocus event, so how can I cause a postback to occur when my TextBox loses focus? Update: I have found a blog which seems to give a pretty decent solution to this. It involves adding...

jQuery custom event

Why isn't this being triggered? $('#nav').bind('app:event', function (event, status) { console.log([event, status]); }); when this is: $(document).bind('app:event', function (event, status) { console.log([event, status]); }); the event is being fired using: $(this).trigger('app:event', [options]); from within a plugin. This...

Custom Actionscript 3.0 Events: Build separate Classes for different purposes or use one for all?

I'm using custom Events in Actionscript 3.0 for the first time and I'm unsure about how to best design them. I need a couple of Events. Some of them need to transport different kinds of data and some don't. Now I don't know whether I should use a single class to implement them all or use separate classes for different kinds of purposes. ...

Yahoo UI Custom Button

I have a YUI button defined through HTML markup. I managed to get it loaded and "skinned" properly. The problem is a custom click event. I have tried a number of approaches all of which links the custom function to the 'click' event, but no matter which way I do it, it ALWAYS triggers upon page loading and then it doesn't fire when cli...

YUI Custom Event for Dropdown value pre-selection ?

I have a dropdown field and its value is pre-selected as soon as its rendered(Say, its a Country field in a signup form). And I have other dropdowns or other components which change the selected value of the first dropdown dynamically. Now I want to fire a method with every "value getting selected" in the dropdown. Is it possible? To pu...

Problems with ASP.NET and custom events

I have a problem when handling the ReceiveCompleted event of a MessageQueue in ASP.NET. It catches it successfully, but every changes applied to the Controls of the page have no effect. This is what I've got: .ASPX <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="False"> <ContentTemplat...

Custom Events in pygame

Hello everyone, I'm having trouble getting my custom events to fire. My regular events work fine, but I guess I'm doing something wrong. Here is the relevant code: evt = pygame.event.Event(gui.INFOEVENT, {'time':time,'freq':freq,'db':db}) print "POSTING", evt pygame.event.post(evt) .... Later .... for event in pyga...

Custom Event - invokation list implementation considerations

I'm looking for some pointers on implementing Custom Events in VB.NET (Visual Studio 2008, .NET 3.5). I know that "regular" (non-custom) Events are actually Delegates, so I was thinking of using Delegates when implementing a Custom Event. On the other hand, Andrew Troelsen's "Pro VB 2008 and the .NET 3.5 Platform" book uses Collection ...

WPF- Is it possible to add an OnVerticalOffsetChanged event to a custom textbox?

Is there any way for me to do this? ...

How to work with delegates and event handler for user control.

I have created a user control that contains a button. I am using this control on my winform which will be loaded at run time after fetching data from database. Now I need to remove a row from a datatable on the Click event of that button. The problem is that how do I capture that event in my form. Currently it goes in that user control...