Skip to content

Instantly share code, notes, and snippets.

@neilmanuell
Created July 14, 2011 12:03
Show Gist options
  • Save neilmanuell/1082331 to your computer and use it in GitHub Desktop.
Save neilmanuell/1082331 to your computer and use it in GitHub Desktop.
A strictly-typed signal with dispatchValue method wrapping the generic dispatch method
public class MyStrictSignal extends Signal{
public function MyStrictSignal():void{
super( String, int );
}
public function dispatchValues( name:String, index:int ):void{
dispatch( name, index );
}
}
private var _signal:MyStrictSignal = new MyStrictSignal();
public function dispatchStrictSignal():void{
_signal.dispatchValues( "Hello", 5 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment