View Single Post
02-10-12, 02:42 AM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,935
The wowpedia loading process description is pretty accurate in its description. me and scott changed our addon loading process after I figured that VAIABLES_LOADED and PLAYER_ENTERING_WORLD sometimes loaded in different order and wasn't consistent enough to guarantee using just one of them for the same code segment.

http://www.wowpedia.org/AddOn_loading_process

Saved variables loading

After the addon code has been loaded, the loading process can be followed by registering for various events, listed here in order of firing.
1. ADDON_LOADED This event fires whenever an AddOn has finished loading and the SavedVariables for that AddOn have been loaded from their file.

2. SPELLS_CHANGED This event fires shortly before the PLAYER_LOGIN event and signals that information on the user's spells has been loaded and is available to the UI.

3. PLAYER_LOGIN This event fires immediately before PLAYER_ENTERING_WORLD.
Most information about the game world should now be available to the UI.
All Sizing and Positioning of frames is supposed to be completed before this event fires.
AddOns that want to do one-time initialization procedures once the player has "entered the world" should use this event instead of PLAYER_ENTERING_WORLD.

4. PLAYER_ENTERING_WORLD This event fires immediately after PLAYER_LOGIN
Most information about the game world should now be available to the UI. If this is an interface reload rather than a fresh log in, talent information should also be available.
All Sizing and Positioning of frames is supposed to be completed before this event fires.
This event also fires whenever the player enters/leaves an instance and generally whenever the player sees a loading screen

5. PLAYER_ALIVE This event fires after PLAYER_ENTERING_WORLD
Quest and Talent information should now be available to the UI


Until 3.0, VARIABLES_LOADED used to fire upon completion of the addon loading process; since 3.0, it is fired in response to CVars, Keybindings and other associated "Blizzard" variables being loaded, and may therefore be delayed until after PLAYER_ENTERING_WORLD. The event may still be useful to override positioning data stored in layout-cache.txt
And as for the variables table, thats the way I usually use them.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote