RE: Namespace advice needed
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: RE: Namespace advice needed
- From: Jeff Smith <spammealot1@...>
- Date: 2011年2月23日 21:53:15 +0000
Hi Luiz
Thanks for the speedy reply
> This is simpler:
> acme={graphics=graphics}
> graphics=nil
Ooops, yes that is the better way of doing it. I did type that originally but I changed it as I wrongly thought the following graphics = nil line would cause the acme table to get its graphics table entry also deleted. Newbie alert !
Anyway, the main gist of my question still applies, which of the 3 options listed is the better way of doing this?
Regards Geoff
PS. looks like I double posted somehow, sorry not sure what caused that.
> Date: 2011年2月23日 18:34:18 -0300
> From: lhf@tecgraf.puc-rio.br
> To: lua-l@lists.lua.org
> Subject: Re: Namespace advice needed
>
> > -- for each table I need to move,
> > acme={}
> > acme.graphics={}
> > for k,v in pairs(graphics) do
> > acme.graphics[k] = v
> > end
> > graphics = nil
>
> This is simpler:
> acme={graphics=graphics}
> graphics=nil
>