Created
June 22, 2014 19:44
-
-
Save mer30hamid/1aa4352dabf160e2820e to your computer and use it in GitHub Desktop.
use lambda, a new feature of C++11, for event answering
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
fm.make_event<events::click>([]{ | |
//When the form is clicked, the object created | |
//by this lambda will be “called”. | |
}); | |
//or | |
fm.make_event<events::click>([](const eventinfo& ei){ | |
//When the form is clicked, the object created | |
//by this lambda will be “called”, and I can | |
//read the parameter. | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment