Thread Tools Display Modes
09-20-16, 10:56 AM   #1
Sweetsour
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2014
Posts: 130
Library issue(s)?

So I just released a beta version of my addon and users have been experiencing many issues that I haven't experienced on my end.

To start, the interface options panel is acting strangely. The top picture is what the interface options should look like.


The following is a screenshot a user sent me that shows the subcategories in incorrect places as well as the "ShamanAuras" category isn't there.


Additionally, I tried to run my addon on a fresh copy of WoW (empty addon folder and new WTF folder). It showed up in my addon list, but it didn't appear in the interface options and also threw back an error when I tried my slash commands.

Here's all the relevant code:

TOC File
Code:
## Interface: 70000
## Title: Sweetsour's Shaman Auras (DEV)
## Notes: A full package of auras for all 3 Shaman specializations
## Author: Sweetsour
## Version: r1-beta
## SavedVariables: SSA_db
## X-Curse-Packaged-Version: r1
## X-Curse-Project-Name: Sweetsour's Shaman Auras
## X-Curse-Project-ID: sweetsour-shaman-auras
## X-Curse-Repository-ID: wow/sweetsour-shaman-auras/mainline
## X-Curse-Packaged-Version: r1-beta
## X-Curse-Project-Name: Sweetsour's Shaman Auras
## X-Curse-Project-ID: sweetsours-shaman-auras
## X-Curse-Repository-ID: wow/sweetsours-shaman-auras/mainline

## OptionalDeps: Ace3, LibStub

#@no-lib-strip@
Libs\LibStub\LibStub.lua
Libs\CallbackHander-1.0\CallbackHander-1.0.lua
Libs\AceAddon-3.0\AceAddon-3.0.xml
Libs\AceGUI-3.0\AceGUI-3.0.xml
Libs\AceHook-3.0\AceHook-3.0.xml
Libs\AceConfig-3.0\AceConfig-3.0.xml
Libs\AceConsole-3.0\AceConsole-3.0.xml
Libs\AceDB-3.0\AceDB-3.0.xml
Libs\AceEvent-3.0\AceEvent-3.0.xml
Libs\AceLocale-3.0\AceLocale-3.0.xml
Libs\AceTimer-3.0\AceTimer-3.0.xml
#@end-no-lib-strip@
Libs\LibDataBroker-1.1\LibDataBroker-1.1.lua

embeds.xml

Locales\LocalizationCore.lua
Locales\enUS.lua
Locales\ptBR.lua
Locales\frFR.lua
Locales\deDE.lua
Locales\itIT.lua
Locales\koKR.lua
Locales\esMX.lua
Locales\ruRU.lua
Locales\zhCN.lua
Locales\esES.lua
Locales\zhTW.lua

SA_Core.lua
SA_Frames_Elemental.lua
SA_Frames_Enhancement.lua
SA_Frames_Restoration.lua
SA_Functions.lua
SA_Config.lua
SA_Init.lua
.pkgmeta
Code:
package-as: ShamanAuras
enable-nolib-creation: no

externals:
    Libs/LibStub:
        url: svn://svn.wowace.com/wow/libstub/mainline/trunk
        tag: latest
    Libs/CallbackHandler-1.0:
        url: svn://svn.wowace.com/wow/callbackhandler/mainline/trunk/CallbackHandler-1.0
        tag: latest
    Libs/LibButtonGlow-1.0:
        url: git://git.wowace.com/wow/libbuttonglow-1-0/mainline.git
        tag: latest
    Libs/LibDataBroker-1.1:
        url: git://git.wowace.com/wow/libdatabroker-1-1/mainline.git
        tag: latest
Addon Initialization
Lua Code:
  1. local FOLDER_NAME, SSA = ...
  2.  
  3. local Auras = LibStub("AceAddon-3.0"):NewAddon("ShamanAuras", "AceConsole-3.0","AceEvent-3.0", "AceHook-3.0", "AceTimer-3.0");
  4. Auras.version = GetAddOnMetadata(FOLDER_NAME, "Version")
  5. Auras:RegisterChatCommand("ssa","ChatCommand");
  6. local L = LibStub("AceLocale-3.0"):GetLocale("ShamanAuras", true)
  7.  
  8. function Auras:OnInitialize()
  9.     local about_panel = LibStub:GetLibrary("LibAboutPanel", true)
  10.  
  11.     if about_panel then
  12.         self.optionsFrame = about_panel.new(nil, "ShamanAuras")
  13.     end
  14.    
  15.     self.db = LibStub("AceDB-3.0"):New("SSA_db",defaults);
  16.     self:SetupOptions();
  17. end

Config File
Lua Code:
  1. local settings_options
  2.  
  3. local function GetSettingsOptions()
  4.     if not settings_options then
  5.  
  6.         settings_options = {
  7.             type = "group",
  8.             order = 1,
  9.             name = L["Settings"],
  10.             desc = L["Advanced customization options"],
  11.             args = {
  12.                 EleSettings = {
  13.                     name = L["Elemental"],
  14.                     type = "group",
  15.                     order = 1,
  16.                     args = {
  17.                         FreeMoveEle = {
  18.                             order = 1,
  19.                             type = "execute",
  20.                             name = L["Move Elemental Auras"],
  21.                             func = function()
  22.                                 Auras:InitMoveAuraGroups(SSA.AuraObjectsEle,"Ele")
  23.                             end,
  24.                         },
  25.                         ResetEle = {
  26.                             order = 2,
  27.                             type = "execute",
  28.                             name = L["Reset Elemental Auras"],
  29.                             func = function()
  30.                                 Auras:ResetAuraGroups(Auras.db.char.frames.defaultPos.eleGrp,Auras.db.char.frames.eleGrp)
  31.                             end,
  32.                         },
  33.                     },
  34.                 },
  35.             },
  36.         }
  37.     end
  38. end
  39.  
  40. function Auras:SetupOptions()
  41.     local ACFG = LibStub("AceConfig-3.0")
  42.     ACFG:RegisterOptionsTable("ShamanAuras Elemental Auras", GetElementalOptions)
  43.     ACFG:RegisterOptionsTable("ShamanAuras Enhancement Auras", GetEnhancementOptions)
  44.     ACFG:RegisterOptionsTable("ShamanAuras Restoration Auras", GetRestorationOptions)
  45.     ACFG:RegisterOptionsTable("ShamanAuras Settings", GetSettingsOptions)
  46.  
  47.     local ACD = LibStub("AceConfigDialog-3.0")
  48.     ACD:AddToBlizOptions("ShamanAuras Elemental Auras", L["Elemental Auras"], "ShamanAuras")
  49.     ACD:AddToBlizOptions("ShamanAuras Enhancement Auras", L["Enhancement Auras"], "ShamanAuras")
  50.     ACD:AddToBlizOptions("ShamanAuras Restoration Auras", L["Restoration Auras"], "ShamanAuras")
  51.     ACD:AddToBlizOptions("ShamanAuras Settings", L["Settings"], "ShamanAuras")
  52. end

Last edited by Sweetsour : 09-20-16 at 10:59 AM.
  Reply With Quote
09-23-16, 10:20 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Well, the first thing that jumps out at me is that your "GetSettingsOptions" function should return the "settings_options" table, but doesn't.

However, since you call this function pretty much on load, there's not much reason for it to exist at all. Just define the table right there where you define the "settings_options" variable on the first line, and then refer to "settings_options" directly instead of calling GetSettingsOptions() ... or just define the table inline in the call to RegisterOptionsTable, since it looks like you only ever refer to it the one time.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
09-28-16, 10:56 AM   #3
Sweetsour
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2014
Posts: 130
Apologies, I was out of town the past few days, or I would have responded to this sooner.

As you pointed out, I should have included my function for settings_options in the chunk of code I posted. Though, that was only a portion of that function, but leaving that out was an important detail, sorry!

I ended up figuring out what the issue was, though. Somewhere along the lines, I forgot to add "LibAboutPanel" into my Libs folder. Not sure how I missed that, but when I added it, everything was good to go!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Library issue(s)?


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