View Single Post
09/17/17, 09:10 AM   #3
rockingdice
 
rockingdice's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2017
Posts: 10
Originally Posted by Baertram View Post
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
Thank you, I'll try it!
  Reply With Quote