diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-05-10 20:48:14 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-05-10 20:48:14 (GMT) |
commit | a33a96fd7aee6d53f663102c56236e91d77f53a7 (patch) | |
tree | 3a27a07f8f4eeddd233b2bb8ed9a5c43c36077c6 /contrib/src/uscxml | |
parent | 5083ea697c263a507341c98c5dadbb23953bd4fb (diff) | |
download | uscxml-a33a96fd7aee6d53f663102c56236e91d77f53a7.zip uscxml-a33a96fd7aee6d53f663102c56236e91d77f53a7.tar.gz uscxml-a33a96fd7aee6d53f663102c56236e91d77f53a7.tar.bz2 |
Fixed issue 114
Diffstat (limited to 'contrib/src/uscxml')
-rw-r--r-- | contrib/src/uscxml/ExtendedLuaDataModel.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/contrib/src/uscxml/ExtendedLuaDataModel.h b/contrib/src/uscxml/ExtendedLuaDataModel.h index 652a2a0..44e4b5d 100644 --- a/contrib/src/uscxml/ExtendedLuaDataModel.h +++ b/contrib/src/uscxml/ExtendedLuaDataModel.h @@ -27,15 +27,18 @@ public: ExtendedLuaDataModel() {}; std::shared_ptr<DataModelImpl> create(uscxml::DataModelCallbacks* callbacks) { - std::shared_ptr<ExtendedLuaDataModel> dm(new ExtendedLuaDataModel()); -// dm->LuaDataModel::init(callbacks); - - lua_pushcfunction(dm->_luaState, GetSomeResult); - lua_setglobal(dm->_luaState, "GetSomeResult"); - + dm->_callbacks = callbacks; + dm->setup(); return dm; } + + void setup() { + uscxml::LuaDataModel::setup(); + lua_pushcfunction(_luaState, GetSomeResult); + lua_setglobal(_luaState, "GetSomeResult"); + + } static int GetSomeResult(lua_State * L) { LOGD(uscxml::USCXML_INFO) << "Calling GetSomeResult!" << std::endl; |