lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


hello,

I've done something like this :
in lua 
	var = createVar() 	// create object in c++, so not garbage collected
	doSomething(var)	// launch c++ function

it works but it's not exactly what i want to do.

i want to do that :
in lua :
	var = createVar()
	var.doSomething()

but I don't know exactly how to do that.

i have used light user data and table but i don't know if it's the right way.
can i use heavy user data ? 

I have seen something here http://lua-users.org/lists/lua-l/2003-05/msg00364.html but i don't know if it's the right way too, and i don't understand what the myThunker object is.

could you help me and give me a little example on how a can to do that ?

thank you
john