Actually, I was thinking. Instead of subclassing from TPersistent, you could possible do something like so instead for more flexability with base class types:
Code:
{$M+}
TTestClass=class
private
FBalance: Double;
procedure SetBalance(const Value: Double);
public
class procedure RegisterTo(LuaScript:TLUA);
published
procedure Deposit(Amount:Double);
procedure Withdraw(Amount:Double);
property Balance : Double read FBalance write SetBalance;
end;
{$M-}
I believe the ($M+} will also give you RTTI info as well
Paul.
Bookmarks