| 441 | } |
| 442 | |
| 443 | void 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 | //-------------------------------------------------------------- |
| 457 | void ofxLua::scriptTouchDown(ofTouchEventArgs &touch) { |
nothing calls this directly
no test coverage detected