View Single Post
06/26/14, 08:03 AM   #6
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Originally Posted by Shinni View Post
not a perfect way but this should work:
Lua Code:
  1. local AddOnManager = GetAddOnManager()
  2. for i = 1, AddOnManager:GetNumAddOns() do
  3.         local name, title, author, description, enabled, state, isOutOfDate = AddOnManager:GetAddOnInfo(i)
  4.     if title == "myaddonname" then
  5.         if isOutOfDate then
  6.             --api change!
  7.         end
  8.     end
  9. end
it doesn't retrieve the api version but if the addon was uptodate, it will know if there was an API change.
Very nice idea. Just need to store if this OOD state was already detected before.

Since that is propably better to be left to a library to gather all this data once, I made it a Feature Request for OrangUtils.
But I am going to test it a bit via a button. If he thinks it is out of scope, I just make it library myself.