Created
March 26, 2012 10:47
-
-
Save purplefox/2204406 to your computer and use it in GitHub Desktop.
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
I need a reference so I can unregister a handler from within a handler. otherwise would need to declare the handler first, put it in a variable and use that. | |
Wanna be able to do this with anon handlers | |
foo.registerHandler(myClosure = { | |
// Do something | |
// Now unregister handler | |
foo.unregisterHandler(myClosure) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
getSelf()
on Closure for 2.0 would get my vote, but it does probably constitute a breaking change and undoubtedly there would be confusion between 'this' and 'self'. Anyway, this is a digression, sorry.