[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Userdata management
- From: "Nick Trout" <nick@...>
- Date: Fri, 9 Nov 2001 13:16:19 -0000
> > Here is some code to play with. The first bit is your userdata binding,
> > second bit is the Lua register operator. Its a bit like trying to do
> > operators in C++. You have to specify the operator explicitly using regop.
> > Hope this answers your question.
> Yes. I thought I would need something like this. I'm not entirely happy
> with the extra steps (one extra function call and a lookup in a table),
> but this method is indeed pratical and general.
Hopefully someone else will come up with a quicker solution or optimise mine
I'm sure there must be other ways of doing it using tagmethods which might be
quicker but a little messy, and probably more error prone(?)
Anyway its lunch now :-)