Quote Originally Posted by paul_nicholls
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.
Well actually when complete the importer will just be ran on your source and will create a wrapper unit for it. The problem was I needed an object that was quick and easy to test on that exhibited everything I wanted to wrap up. The only one I haven't figured out yet is properties with array indexes. BTW: If you want to use object assignment for properties then you have to do a GetPropType(Instance, PropName) = tkClass (thats off the top of my head so its probiably wrong) and then get the table's reference to _Self. Other then that its pretty straight forward . Hopefully I get everything completed some time soon.