This fork adds the following method to ISlot: applyTo(value) where value is either a class or instance. Example usage: signal.add().applyTo(this); ... signal.removeAll(this); For more information: http://justinjmoses.wordpress.com/2011/09/22/selective-removeall-addition-to-as3-signals/
ActionScript
Pull request Compare This branch is 11 commits ahead, 18 commits behind robertpenner:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
libs
performance-test/org/osflash/signals
src/org/osflash/signals
tests/org/osflash/signals
.gitignore
CHANGELOG.textile
MIT-LICENSE.txt
Maven-Instructions.mdown
README.textile
TODO.textile
as3-signals.as3proj
build.properties
build.xml
pom.xml

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