ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Libraries (https://www.esoui.com/forums/showthread.php?t=1198)

Sideshow 04/27/14 04:05 AM

Libraries
 
Hello

Just a question.
If my addon uses a library, version 1.45, but another addon uses a previous version of the same lib, let's say 1.33. And, the addon is loaded sooner than mine. This means LibStub will give my addon the old version.

Am I right about this? What can/should be done about it ?

thelegendaryof 04/27/14 05:34 AM

Thats what the minor is for. If you have a look at the source:

Lua Code:
  1. local oldminor = self.minors[major]
  2. if oldminor and oldminor >= minor then return nil end

So the one with the highest minor gets loaded in the end and all other instances are deleted/overwritten.

Also see here:
http://www.wowace.com/addons/libstub/

Cheers

Sideshow 04/27/14 06:43 AM

Ok, thanks


All times are GMT -6. The time now is 08:58 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI