custom-events

Attaching a property to an event in Flex/AS3

I have a parameter that needs to be passed along with an event. After unsuccessful attempts to place it on the type by extending the class, I've been advised in another SO question to write a custom event. I tried this before but I couldn't figure out how to send it, because I just want to send another parameter with a normal Event.COM...

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

jQuery: How to use event.preventDefault() with custom events?

How can I know in my triggering code that preventDefault had been called? $(document).trigger('customEvent', params); if (/* ??? */) doDefaultActions(); ...

wxPython: Threading GUI --> Using Custom Event Handler

I am trying to learn how to run a thread off the main GUI app to do my serial port sending/receiving while keeping my GUI alive. My best Googling attempts have landed me at the wxpython wiki on: http://wiki.wxpython.org/LongRunningTasks which provides several examples. I have settled on learning the first example, involving starting a wo...

Class as an Event Observer

I want to do something like this... var Color = Class.create({ initialize: function() { this._color = "white"; this.observe("evt: colorChanged", this.colorChanged.bind(this)); }, changeColor: function(color) { this._color = color; this.fire("evt: colorChanged"); }, colorChanged: functi...

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

Events in Classes

I find that I write a lot of code within my classes to keep properties in sync with each other. I've read about Events in Classes, but have not been able to wrap my head around how to make them work for what I'm looking for. I could use some advice here. For example, in this one I always want to keep myColor up to date with any change w...

Change content of a Label depending on panel size

Hi there, once again I've got a question. Since I am using Google Web Toolkit (GWT) at work (along with Java Servlets), I am currently building some user interface with GWT (in Java). I've got some trouble though. I am using a SplitLayoutPanel which contains a ScrollPanel on the left and another one on the right. In the left ScrollPan...

Flex Error on Simple Custom Event when Implemented in Actionscript (But not in MXML)

Hi, I'm trying to learn how to use custom events in Flex. I'm following Oliver Merk's tutorial found here: blog The custom event works if I implement it using MXML in the main app. But, if I use actionscript, then I get error 1119: Access of possibly undefined property ADD_PRODUCT through a reference with static type Class. My Event...