[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: newbie question: is globals() usable in practice ?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 2 Jul 2002 13:28:31 -0300
>It looks like as soon as the globals table is swapped, execution stops. Why
>is that ? Is this a normal behaviour, and if so, what is the practical use
>of the globals() function ?
You've installed an *empty* table and so "print" and "globals" are no longer
defined in the new global table. You need at least this:
local t = {print=print, globals=globals}
(Also, save _ERRORMESSAGE and _ALERT in t if you want to see any errors
reported.)
Or you can setup "index" tag methods so that the new table can inherit from
the original global table.
--lhf