Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Signals: Think Outside the Event.
Signals are light-weight, strongly-typed AS3 messaging tools.
Wire your application with better APIs and less boilerplate than AS3 Events.
- A Signal is essentially a mini-dispatcher specific to one event, with its own list of listeners.
- A Signal gives an event a concrete membership in a class.
- Listeners subscribe to real objects, not to string-based channels.
- Event string constants are no longer needed.
- Signals are inspired by C# events and signals/slots in Qt.
// with EventDispatcher button.addEventListener(MouseEvent.CLICK, onClick); // Signal equivalent; past tense is recommended button.clicked.add(onClicked);
I am still looking for impressions, critiques and suggestions.
My email is robert at robertpenner.com.
I’m @robpenner on Twitter.