[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Simple (?) question about metatables and userdata
- From: John Klimek <jklimek@...>
- Date: Thu, 15 Dec 2005 15:10:52 -0500
Thanks for the reply!
How would I make a C++ (or Delphi in my case) object *that is already
created* accessible in Lua then?
I've tried creating full userdata that is only a pointer to my object
and then dereferencing the pointer but it's not working properly at
So, if I already have an object created (lets call this object Player1
of class TPlayer), how do I make a userdata object out of it?
On a sidenote, I think I've finally figured out the correct way to
setup a metatable for userdata. I'm still wondering if I need to make
my metatable table global or not though.
On 12/15/05, Daniel Silverstone <firstname.lastname@example.org> wrote:
> On Thu, 2005-12-15 at 11:09 -0500, John Klimek wrote:
> > 7) Push light userdata onto the stack.
> Light userdata objects can't have metatables.
> Daniel Silverstone http://www.digital-scurf.org/
> PGP mail accepted and encouraged. Key Id: 2BC8 4016 2068 7895