View Single Post
09/17/17, 08:52 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Check the manifest txt file in your addon folder and use the directives

Code:
##DependsOn
##OptionalDependsOn
put each addon name behind the directive line, with a splitting space, to assure that these addon names/library names get loaded BEFORE your addon's ON_LOAD event gets started.

e.g.

Code:
## OptionalDependsOn: libFilters-2.0 LibAddonMenu-2.0 ResearchAssistant SousChef VotansSettingsMenu PotionMaker CraftedPotions ChatMerchant InventoryGridView CraftBagExtended SetTracker AdvancedDisableControllerUI DetailedResearchScrolls
Inside your OnLoad event callback function you are able to check the addonName == "Other addon name" or if a global variable of the other addon exists you can check this by using something like

Lua Code:
  1. --Is the addon "abc" is loaded yet?
  2. if ABC ~= nil and ABC.functioName ~= nil then
  3. --Addon abc is loaded and function functioName exists.
  4. --Call the function now
  5. ABC.functionName()
  6. end
  Reply With Quote