View Single Post
01/30/16, 02:50 AM   #32
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by Terrillyn View Post
I actually went into the settings panel changed a setting, then typed /explorer (from DevTools) (which should have been uptodate as I've seen in other tables), opened the <addonname>_Settings table and what it gave we was not up to date with what I changed, SimpleXPBar.CurSV was however. Doesn't the metatable get added to the table and not just wrap it?
The attached picture should tell why I think this, maybe I'm wrong though.
In the picture CurSV is AWSV which should have the same values as $AccountWide, but $AccountWide has outdated values if I change something.
Those are not supposed to be the same. Each table will have its own id. The only way those id's would be the same is if both values pointed to the same reference (same table). Those two tables having different values does not mean they don't contain the same data.

Lua Code:
  1. temp = { dummyValue = true }
  2. temp2 = temp
  3. d("Table 1: "..tostring(temp))
  4. d("Table 2: "..tostring(temp2))
  5. -- Those would have the same id because temp 2 points to temp 1
  6. -- They both reference the same table, temp 2 is NOT a copy
  7.  
  8. temp3 = ZO_DeepTableCopy(temp)
  9. -- Temp & temp3 would not have the same id
  10. -- they are two different tables, regardless of their content.

The picture you posted is comparing CurSV & _G["xxxxx"]["Default"][sDisplayName]["$AccountWide"]
Those are not the same tables, they shouldn't have the same ID's.

Last edited by circonian : 01/30/16 at 02:58 AM.
  Reply With Quote