This content has been marked as final. Show 5 replies
I think LR SDK adds a lot of crap to Lua and DOES NOT DOCUMENT it. I hate that....
@Dave: You guessed correctly; there's a metatable entry for both __index and __newindex. The __index entry is just a reference to the contents table. The __newindex entry is there so we can detect value changes and send out notifications.
@Kamal: This is actually a fairly straightforward use of existing Lua mechanisms. The version of Lua we're using is essentially off-the-shelf Lua 5.1.2.
I was very frustrated about something else and thought this is a similar.(EMBARRASSED).
Any way, it would be helpful if you check a 'bug' I put a while ago. I am not sure if it is bug but nobody seems to have any comment about it. Can you have a look? It is titled A bug in LrXml
Eric - Thanks for the reply. So, given the metatable setup, would you recommend my way of iterating through all of the table's contents or is there a "friendlier" way that doesn't touch internals directly and is thus less likely to need changing in the future?
Unfortunately, no, there isn't.