[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: tag methods question
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 22 Sep 2000 18:13:51 -0300 (EST)
>Section 4.8 of the manual says that the tag method events are hard coded
>into the interpreter. Does this apply to the setglobal/getglobal events
>even though they are defined in the basic library?
No tag methods for setglobal/getglobal events are defined in the basic library,
which only contains setglobal/getglobal *functions*.
>I'm trying to find a way to have global access routed to the normal access
>of the global table (not raw).
That's what the setglobal/getglobal are for.
You *might* give the global table a tag and then use the settable/gettable
tag methods, but keep in mind that the semantics of the two sets of tag methods
is not the same.
>I'm willing to let global access be as slow as table access
In 4.0, access to globals is as fast (or as slow) as table access,
because the globals are stored in an Lua table.
But maybe I misunderstand you.
Could you give us an example of what you want to?
--lhf