View Single Post
05/15/14, 12:27 PM   #14
Edda
 
Edda's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 60
Originally Posted by Roupine View Post
Hmm. The only thing I can think of without being able to get into the game and look into it myself would be using your memory table as its own default table. That's a wild guess though.
Instancing memory with itself as default value just instances it as '{}' if no memory is found on the user's local machine. I like doing it this way.

Another example. Instancing Addon.Options with Addon.Options as default value gives all the default values stored in Addon.Options to... itself (so Addon.Options == Addon.Options default value given no data is found locally - and option default values are written locally). If data is found locally then Addon.Options gets rewritten with local values. Saves you the hassle from read/write functions to user's saved variable i.e. if user changes an option then the addon bears with it AND it's saved locally. You know what I mean
  Reply With Quote