View Single Post
04-25-12, 05:45 PM   #20
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Originally Posted by Billtopia View Post
<snip>... put the addon names of the addons you need to hook as dependencies in the toc file, <snip>
That is not always a good idea.
Especially where it concerns Blizzard_* addons.
ReqDep -ing an addon forces it to load when the client gets to parsing your addon .toc file during the loading process.

The problem is that the Blizzard_* addons and the FrameXML code have some hidden dependencies on each other that are not enforced through a similar mechanism.
Parts of Blizzard code just "expect" other Blizzard addons or parts to be present when they get to loading.

When you force-load a Blizzard_* addon by making it a required dependency of your addon you are liable to break alot of things in very subtle and hard to debug ways (examples: missing events in blizz calendar, missing buttons in archaeology_ui, and more examples exist which are hard to group together)

It is generally alot better to avoid messing with "natural" load order and instead either delay loading other addons until you can be relatively sure the client has completely finished initializing, or monitor ADDON_LOADED and react to addons loading off their own accord.
  Reply With Quote