Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
NSDictionary to Lua Table — Gideros Forum

NSDictionary to Lua Table

CarolineCaroline Guru
edited January 2012 in General questions
Hopefully my last plugin stumbling block. Sending a table of data back to Lua from an NSDictionary.

I can do this if I know the data types - so I'm just checking that there is no other way apart from going through the NSDictionary keys and checking what data types each value is, and then adding the value to the lua stack table via the lua_push'correcttype' function.

I'd really like a lua_pushanyvalue function, but I don't think it exists.

I can also send back the address of the NSDictionary via lightuserdata, but I don't think that helps, as I don't think I can extract data directly in Lua. Can I?

Also, if I were to (eventually) post code for an iOS plugin, which would consist of a .mm file, and the corresponding Lua file, should I do that on Github or here?


Sign In or Register to comment.