Thread Tools Display Modes
04/26/24, 10:12 AM   #1
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,039
Another example for that will be e.g. SavedVariables where you use ZO_SavedVars wrapper to load the global SavedVariable table, which you have defined in your manifest txt file after ## SavedVariables: <tableNameHere>, into a local reference "settings".

Code:
local settings = ZO_SavedVars:New*
settings is a local reference then to the global table _G, where there was defined another subtable called <tableNameHere>

_G["<tableNameHere>"] = same as <tableNameHere>

If e.g. <tableNameHere> would be MyAddonsSavedVariables then you can access (after EVENT_ADD_ON_LOADED) that table MyAddonsSavedVariables directly or via _G["MyAddonsSavedVariables"], and your local settings would point to the actual real savedvariables patch like
MyAddonsSavedVariables["Default"]["NA Megaserver"]["@accountName"]
which all got handled by the wrapper ZO_SavedVars creating these subtables if not already exisiting and then returning that reference
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Question on EVENT_JUSTICE_* firing


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off