Skip to content
Signals is a new approach for AS3 events, inspired by C# events and signals/slots in Qt.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
libs Added Hamcrest SWC to enable assertThat() in tests. Sep 12, 2012
performance-test/org/osflash/signals Cleaning up the import statements Apr 11, 2011
src/org/osflash/signals
tests/org/osflash/signals Added PromiseTest to AllTests. Sep 12, 2012
.gitignore Updated .gitignore to ignore Maven/IntelliJ output directories. Nov 22, 2010
CHANGELOG.textile Tweaks to change log. Aug 31, 2011
MIT-LICENSE.txt Added MIT license notice. Nov 1, 2009
README.textile Fix blog links in README Oct 8, 2015
TODO.textile Updated TODO. Aug 30, 2011
as3-signals.as3proj FlashDevelop 4.0 changed the .as3proj file. Aug 2, 2011
build.properties Incremented version number to v0.9-BETA. Aug 31, 2011
build.xml Added "package" build target which bundles SWC and source into a nice… Aug 31, 2011

README.textile

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.

Concept

  • A Signal is essentially a mini-dispatcher specific to one event, with its own array 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.

Syntax

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

Background on AS3 Events

You can’t perform that action at this time.