View Single Post
05/12/14, 10:32 PM   #10
RavenDT
 
RavenDT's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 6
Okay, I kinda found a work-around, but...

So, with using Zgoo, I was able to find out some interesting information.

When you grab SavedVariables with:

Code:
myVar = ZO_SavedVars:NewAccountWide("mySavedVars", ... )
It only assigns a reference to myVar. In reality, your SavedVariables all get loaded into one big table whenever your addon loads.

So while I had "myTable" that I was working with trying to clean out and failing miserably, it's because everything I've thrown at it hasn't been able to affect the reference in any way. I can't even get keys from it because it only returns the meta information.

But, when doing the same thing with myAddon_SavedVars.myTable["@Username"]["$AccountWide"], it works. Pairs works, and nil assignment to clear the table out, everything works.

However, it's a really crappy way to do business. Does anyone know how to force the table to be dereferenced? Or am I stuck in using this workaround?
  Reply With Quote