|
@@ -73,6 +73,7 @@ int INV_RunCode(laOperator* a, laEvent* e){
|
|
if(luaL_loadstring(L, Data.Code->Ptr)){ luaerr("luaL_loadstring() error:") };
|
|
if(luaL_loadstring(L, Data.Code->Ptr)){ luaerr("luaL_loadstring() error:") };
|
|
if(lua_pcall(L, 0, 0, 0)){ luaerr("lua_pcall() error:") };
|
|
if(lua_pcall(L, 0, 0, 0)){ luaerr("lua_pcall() error:") };
|
|
|
|
|
|
|
|
+ printf("Lua state globals:\n");
|
|
lua_pushvalue(L,LUA_GLOBALSINDEX); //lua_pushglobaltable(L); // Get global table
|
|
lua_pushvalue(L,LUA_GLOBALSINDEX); //lua_pushglobaltable(L); // Get global table
|
|
lua_pushnil(L); // put a nil key on stack
|
|
lua_pushnil(L); // put a nil key on stack
|
|
while (lua_next(L,-2) != 0) { // key(-1) is replaced by the next key(-1) in table(-2)
|
|
while (lua_next(L,-2) != 0) { // key(-1) is replaced by the next key(-1) in table(-2)
|
|
@@ -106,10 +107,12 @@ int main(int argc, char *argv[]){
|
|
laWindow* w = laDesignWindow(-1,-1,600,600);
|
|
laWindow* w = laDesignWindow(-1,-1,600,600);
|
|
laLayout* l = laDesignLayout(w,"My Layout");
|
|
laLayout* l = laDesignLayout(w,"My Layout");
|
|
laCreatePanel(l->FirstBlock,"my_panel");
|
|
laCreatePanel(l->FirstBlock,"my_panel");
|
|
- laCreatePanel(l->FirstBlock,"LAUI_input_mapper");
|
|
|
|
|
|
|
|
laStartWindow(w);
|
|
laStartWindow(w);
|
|
laMainLoop();
|
|
laMainLoop();
|
|
|
|
|
|
|
|
+ printf("Clearing Lua state.\n");
|
|
lua_close(L);
|
|
lua_close(L);
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
}
|
|
}
|