[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: getting table indexes & values
- From: Pablo Saldo <ec4pas@...>
- Date: Tue, 27 Jul 1999 02:11:43 -0300
At 10:28 27/07/99 -0300, you wrote:
> >> My Experiences prove it can't get the next table's index.
> Try changing this:
> >> lua_callfunction(lua_getglobal('next'));
> to this:
> >> lua_callfunction(lua_getglobal('next'+char(0)));
> Delphi will type convert string types to pchars but it won't add a
>terminator for you. (this can lead to obscure access violations depending
>on how the caller uses the string!) I'm guessing that this is preventing
>Lua from finding a symbol match. Also, you might try splitting up those
>two calls and check the tag returned by lua_getglobal in the debugger.
I don't it woul resolve my problem, 'cause I can get the first index
(calling next(VarName, nil)) outside the loop, but inside this,
next(VarName, IndexName) still give me the same index, looping forever.
(o,o) Pablo Saldo - ec4pas@super.furg.br
{`"'} FUNDACAO UNIVERSIDADE FEDERAL DO RIO GRANDE
-"-"- ENGENHARIA DE COMPUTACAO