LunaPas is set of classes to access Delphi objects from Lua scripts (like in known Luna.h). Extended to allow usage of Delphi controls and RTTI.
Requires Delphi 2010+ and lua51.dll.
Common API:
print(text: string)
Class API:
function GetProp(property name: string): returns property value
function SetProp(property name: string; property value): sets property
function Invoke(method name: string; params separated by comma): executes method, returns result
function EnumProperties([class name: string]): return array of strings
function EnumMethods([class name: string]): return array of strings
function EnumFields([class name: string]): return array of strings
function SetEvent(event name: string; lua function)
Note: not all property's access available, mostly integer, string, enums and sets.
Changes:
v1.1
Common API moved to LuaVM.pas
GetProp, SetProp, Invoke, EnumProperties, EnumMethods, EnumFields are able to access to inner class
function Invoke to call methods