lua-users home
lua-l archive

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


Thanks.
 
It works by replacing the existing table. I though there's no difference if I delete and recreate a new table at the same place on the stack. The stack looks the same.
 
regards
Andreas
 
-- 
Dipl.-Inf. (FH) Andreas Volz, ES1
Elektrobit
Phone: +49 (9131) 7701 167, mailto:Andreas.Volz@elektrobit.com
Fax: +49 (9131) 7701 333, http://www.elektrobit.com

Elektrobit Automotive GmbH, Am Wolfsmantel 46, 91058 Erlangen, Germany
Managing Director Otto Fößel
Register Court Fürth HRB 4886
 


From: lua-bounces@bazar2.conectiva.com.br [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Lua
Sent: Tuesday, August 28, 2007 8:09 PM
To: Lua list
Subject: Re: Replace LUA table

<Andreas.Volz@elektrobit.com> writes:
        lua_newtable(L);              // table

The previous reply shows how you can replace "a" with a new table constructed by your array2table function.  If you want to simply edit the existing "a", just don't create a new table (remove the line quoted above), rather use the existing table on the stack.

Hope that helps,
James.
----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.