There is still one point that doesn't work correct. If the
input table has e.g. 10 elements and I overwrite only 5 elements, then 5 old
elements are still there. I didn't find a solution to remove the table
elements before I push the new ones. If I pop then the complete table is poped.
Any ideas?
regards
Andreas
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
<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.
----------------------------------------------------------------
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.