LuaScript Xojo Plugin

LuaScriptContext.SetTableValue Method

Takes two top most elements on the stacks and sets them as table element pair. (Key and Value)

SetTableValue()

Parameters

Remarks

Dim i as Integer

lua.NewTable()

for i = 1 to 5
lua.Push(i) // Push the table index
lua.Push("Some cell text: " + Str(i * i)) // Push the cell value
lua.SetTableValue() // Store the pair in the table
next

lua.SetGlobal("foo") // Expose the table to Lua as "foo"

See Also

LuaScriptContext Class