View Single Post
02/06/15, 02:11 AM   #32
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Just to clearify, what I am thinking about style addons:

Lua Code:
  1. --own version check
  2. local MAJOR, MINOR = "LibAddonMenu-2.0-classic", 1
  3. local lam, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
  4. if not lam then return end  --the same or newer version of this lib is already loaded into memory
  5.  
  6. -- well known name registration
  7. MAJOR, MINOR = "LibAddonMenu-2.0", 17
  8. lam, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
  9. if not lam then return end  --a settings addon is registered already

or

Lua Code:
  1. --own version check
  2. local MAJOR, MINOR = "LibAddonMenu-2.0-borderless", 1
  3. local lam, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
  4. if not lam then return end  --the same or newer version of this lib is already loaded into memory
  5.  
  6. -- well known name registration
  7. MAJOR, MINOR = "LibAddonMenu-2.0", 17
  8. lam, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
  9. if not lam then return end  --a settings addon is registered already

I would restrict additional control manipulation to what is possible with the setup data. This way an addon author can not work against the choosen style.
ANY settings addon author "just" needs to supply a compatible API and register to the well known name "LibAddonMenu-2.0".

I just have to finalize my thoughts. But now, I have to work first
  Reply With Quote