public ArrayList lt2ArrayList(LuaEx lua, string keyword) { LuaInterface.LuaTable lt = lua.GetTable(keyword); ArrayList ret = new ArrayList(); if (lt == null) { return(ret); } foreach (object k in lt.Keys) { object[] astr = { k.ToString(), lt[k].ToString() }; ret.Add(astr); } return(ret); //ret.Count }
public string lt2ArrayList_parms(LuaEx lua, string keyword) { string ret = keyword; try { LuaInterface.LuaTable lt = (LuaInterface.LuaTable)(lua.DoString("return debug.getinfo(" + keyword + ")")[0]); if (lt["what"].ToString() == "Lua") { ret += "("; ret += lt["strparms"].ToString(); if (lt["has3dot"].ToString() == "1") { ret += ",..."; } ret += ")"; } } catch { ret = ""; } return(ret); }
public string lt2ArrayList_parms(LuaEx lua, string keyword) { string ret = keyword; try { LuaInterface.LuaTable lt = (LuaInterface.LuaTable)(lua.DoString("return debug.getinfo(" + keyword + ")")[0]); if (lt["what"].ToString() == "Lua") { ret += "("; ret += lt["strparms"].ToString(); if (lt["has3dot"].ToString() == "1") ret += ",..."; ret += ")"; } } catch { ret = ""; } return (ret); }
public ArrayList lt2ArrayList(LuaEx lua, string keyword) { LuaInterface.LuaTable lt = lua.GetTable(keyword); ArrayList ret = new ArrayList(); if (lt == null) return ret; foreach (object k in lt.Keys) { object[] astr = { k.ToString(), lt[k].ToString() }; ret.Add(astr); } return ret; //ret.Count }