Originally Posted by Vuelhering
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
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?