View Single Post
03/13/14, 02:32 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
Sorry, inDef, I was travelling and wanted to give you the answer and time needed, rather than try to get something out quick on my phone.

Glad you were able to find the answers you were looking for, and thanks so much for posting it here for others as well!


/edit: I would like to point out also that in the top of your library code, you should do this:

Lua Code:
  1. local MAJOR, MINOR = "LibAddonMenu-1.0", 4
  2. local lam, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
  3. if not lam then return end  --the same or newer version of this lib is already loaded into memory
Above, according to inDef's lines 58-60, you can see that LibStub:NewLibrary(major, minor) will return nil if the same or newer version of your library already exists. In this case, you can use my line 3 above. This means that the rest of your library's file will not be parsed into memory (so an older version won't overwrite a newer version).

Last edited by Seerah : 03/13/14 at 02:41 PM.
  Reply With Quote