Native2Lua extension

A convenience utility on Object to construct LuaObject instances in-place.

See Object.toLua.

Additionally has shorthand functions for common internal mechanisms such as LuaArgPack unpacking.

on

Methods

makeLuaRef() LuaObject?

Available on Object, provided by the Native2Lua extension

Attempts to return the underlying LuaObject of this to be used as a direct handle or reference. Otherwise null is returned.
toLua(String id) LuaObject

Available on Object, provided by the Native2Lua extension

A new LuaObject.variable instance is returned whose variable name in scope is id.
toLuaRet() LuaObject

Available on Object, provided by the Native2Lua extension

Calls toLua with the id of its own string value. The helps track values as they're moved around.
unpack() LuaObject?

Available on Object, provided by the Native2Lua extension

Tries to unpack a list of values into a single value. If this is LuaObject returns itself. If this is LuaArgPack use the method. If this is anything else, convert to a lua object.