Created
October 18, 2011 23:17
-
-
Save xdenser/1297043 to your computer and use it in GitHub Desktop.
Emiting events
This file contains hidden or 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
... | |
void SteveNode::myEmit(int argc, Handle<Value> argv[]) { | |
char emitType[256]; | |
argv[0]->ToString()->WriteAscii(emitType,0,-1); | |
if (showDebugMessages==1) printf("\nnode-steve.node - myEmit: %s", emitType); | |
HandleScope scope; | |
// ** complete this method such that the 'success' event is received in JavaScript by the registered listener ** | |
node::MakeCallback(handle_,"emit",argc,argv); | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solution provided by Denys Khanzhiyev