lua-users home
lua-l archive

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

>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

Or you can setup "index" tag methods so that the new table can inherit from
the original global table.