[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Type definition within LUA
- From: "Dan East" <dan@...>
- Date: Wed, 9 Jun 2004 09:42:09 -0400
Hi. I wish to allow the user to define classes within LUA that can be
instantiated from the host app (written in C of course).
Something along this line:
myclass={}
function myclass:myfunc()
--do stuff
end
myclass.n=10
host.RegisterClass(myclass)
The host application can then create as many instances of that object as
desired within the LUA environment, where each instance's data will be
unique.
I am currently using lunar to interface my C++ classes with good success,
but I need to allow class-like definitions within LUA as well.
Thanks.
Dan East