View Single Post
03/24/14, 09:14 PM   #16
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
Originally Posted by Vuelhering View Post
Right. That's how I'm currently doing it to prevent issues with globals, but that table is still a global. And other addons can still potentially mess things up. It's far less likely, but they still can.
But it's just one global. And your global table should have a unique name, not a generic one. If someone still wants to come around and mess with your table because it's global, you have bigger problems.

Originally Posted by Vuelhering View Post
Although the "local var = MyAddonTable.var" is not two-way. If you change the value of var, you still have to export it back out to MyAddonTable.var.
Obviously you would use MyAddonTable.var to write to the table and only use var as a local reference to the value that was in the table instead of doing the global and table lookups. Writing to a variable is done less often that reading a variable, no?
  Reply With Quote