View Single Post
05-12-17, 01:37 PM   #20
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by arith View Post
Just commit revision 17 to add LibStub and introduce LibStub:NewLibrary to set version number.
Since LibStub has been used, this will need to be loaded after LibStub.
Please test it and let me know if any issue.
I think the issue is that every addon has it's own functions and sometimes the library calls a function from on addon's file, and sometimes from an another addons file, which could create mismatch numbers even in global variables. If every addon updates to a version which won't let the lib load twice or load an older versions the issue will be gone.

You can eliminate the problem by putting this hack into the Lib_ToggleDropDownMenu funcitons, however you gonna need to put this into every addon's function:

Lua Code:
  1. for i = listFrame.numButtons + 1, 1000 do
  2.     local button = _G["Lib_DropDownList"..level.."Button"..i]
  3.     if button then
  4.         button:Hide()
  5.     else
  6.         break
  7.     end
  8. end

Also this only deals with the visible issues the global mismatch between addons still gonna reamain. The total solution is that the versioning system which will only allow one instance of the lib and it's functions.

Last edited by Resike : 05-12-17 at 01:57 PM.
  Reply With Quote