Created
July 14, 2011 12:03
-
-
Save neilmanuell/1082331 to your computer and use it in GitHub Desktop.
A strictly-typed signal with dispatchValue method wrapping the generic dispatch method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyStrictSignal extends Signal{ | |
public function MyStrictSignal():void{ | |
super( String, int ); | |
} | |
public function dispatchValues( name:String, index:int ):void{ | |
dispatch( name, index ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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