summaryrefslogtreecommitdiffstats
path: root/contrib/src/uscxml
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-05-10 20:48:14 (GMT)
committerStefan Radomski <github@mintwerk.de>2017-05-10 20:48:14 (GMT)
commita33a96fd7aee6d53f663102c56236e91d77f53a7 (patch)
tree3a27a07f8f4eeddd233b2bb8ed9a5c43c36077c6 /contrib/src/uscxml
parent5083ea697c263a507341c98c5dadbb23953bd4fb (diff)
downloaduscxml-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.h15
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;