[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Simple example of sharing data (and objects) between C++ and
- From: "Dušan Majkić" <dmajkic@...>
- Date: Fri, 9 Dec 2005 11:19:30 +0100
>> John Klimek <jklimek@gmail.com> (08.12.2005 20:39:00)
> var
> TestObj : ^TTestObj;
> begin
> TestObj := lua_newuserdata(luaVM, sizeOf(TTestObj));
> TestObj^.property := 500; // <--- this causes an exception
> end;
You need to create your TTestObj.
Add somethig like this before exception line:
TestObj^ := TTestObj.Create; // or TestObj^ := YourExistingObj;