[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Table + LuaJava
- From: Anselmo Junior <afajunior@...>
- Date: Tue, 9 Jun 2009 08:11:59 -0300
But its return me the length of the table right? But dont return me if the 2 is nill and key 3 has some value...
But i try this method to see what happen, and return me 0
when i use call method, the function 'init' will run and the return value is pushed on the stack. If i understand right, i can access this value with -1 index, where is the last element that be push on the stack.
But i left this subject for after, i really need to get what numeric keys is used. I dont know if its possible in LuaJava (or in LUA)
2009/6/9 Robert G. Jakabosky <email@example.com>
On Tuesday 09, Anselmo Junior wrote:
> Oh yeah, and I recently try to do that and work. Only need get what key inMethod objLen in the LuaState class:
> the script is in use to get the values.
public int objLen(int idx)
Looks like you have to use the Lua stack idx of the table.
For strings it will return the string length, for tables it will return the
results of the length operator '#'...
See more here:
Robert G. Jakabosky