View Single Post
05/15/14, 09:08 AM   #7
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Edda View Post
Hmm ok. I dont remember if the 'version' key is at the same level as namespaces (when using namespace), but I think it is (hence you shouldn't be needing to 'skip' this key). Will check it this evening.

About my way of creating the saved variable :

RJ.Memory["foo"] = "bar" works fine (creates key/value in saved variable)
RJ.Memory["foo"] = nil works fine (deletes key/value in saved variables)

Things only screw when I do i.e.

for k, v in RJ.Memory do d(k .. " : " .. v) end

Suddenly it seems I am not handling with the same variable anymore !

It sucks because I liked the idea of namespaces

*** EDIT ***

rawget(table, key) >FOR> table[key] is another table ???
Ah, I did not try how it works with namespace, I have to check it.

In your code above is missing pairs:
Lua Code:
  1. for k, v in pairs(RJ.Memory) do d(k .. " : " .. v) end
  Reply With Quote