MCPcopy Create free account
hub / github.com/danomatika/ofxLua / scriptGotMessage

Method scriptGotMessage

src/ofxLua.cpp:443–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443void ofxLua::scriptGotMessage(ofMessage msg) {
444 if(L == NULL || !isFunction("gotMessage")) {
445 return;
446 }
447 lua_getglobal(L, "gotMessage");
448 lua_pushstring(L, msg.message.c_str());
449 if(lua_pcall(L, 1, 0, 0) != 0) {
450 std::string msg = "Error running gotMessage(): "
451 + (std::string) lua_tostring(L, LUA_STACK_TOP);
452 errorOccurred(msg);
453 }
454}
455
456//--------------------------------------------------------------
457void ofxLua::scriptTouchDown(ofTouchEventArgs &touch) {

Callers

nothing calls this directly

Calls 2

lua_getglobalFunction · 0.85
lua_pushstringFunction · 0.85

Tested by

no test coverage detected