Thread Tools Display Modes
04/27/14, 04:05 AM   #1
Sideshow
 
Sideshow's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 36
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 ?
  Reply With Quote
04/27/14, 05:34 AM   #2
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 161
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
  Reply With Quote
04/27/14, 06:43 AM   #3
Sideshow
 
Sideshow's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 36
Ok, thanks
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Libraries


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off