[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: General questions.
- From: William Roper <lacutis@...>
- Date: Tue, 6 Jul 2004 11:26:37 -0700
Ok, I think I've got it now.
I need to create a wrapper class that will be the userdata.
Inside the wrapper class will at least contain a pointer to my
instanced class and a function wrapper for each function I need to
call in the instanced class from Lua.
Then after I create my instanced class, the factory needs to call a
function that creates the new userdata, then sets the user datas
pointer to instanced class.
I also create a metatable for the userdata that has the methods I need
to call on my instanced class and point them to the wrapper functions
for each of those.
Wow, its a lot to get your head wrapped around at first.
It's interesting how few tutorials there are for Lua on the net.
Let me know if I am on the wrong track, if not, thanks for pointing me
in the right direction everyone.
Ryan.