View Single Post
08-09-18, 12:50 AM   #3
Sweetsour
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2014
Posts: 130
Ah, good call.

This is my initialization code
Lua Code:
  1. function Auras:OnInitialize()
  2.  
  3.     local defaults = SSA.defaults;
  4.     local about_panel = LibStub:GetLibrary("LibAboutPanel", true)
  5.  
  6.     if about_panel then
  7.         self.optionsFrame = about_panel.new(nil, "ShamanAuras")
  8.     end
  9.    
  10.     self.db = LibStub("AceDB-3.0"):New("SSA_db",defaults)
  11.     self:SetupOptions()
  12.    
  13.    
  14. end

The function that handles removing an item from the table is located in a different file
Lua Code:
  1. local SSA, Auras, L, LSM = unpack(select(2,...))
  2.  
  3. local function ConstructAuraList()
  4.     ...
  5.     --- this is the button that runs the deletion
  6.     removeAura = {
  7.         order = 4,
  8.         type = "execute",
  9.         name = "Remove",
  10.         func = function()
  11.             tremove(Auras.db.char.auras[spec].groups[grp],j)
  12.         end,
  13.         width = "half",
  14.     }
  15.     ...
  16. end

It's strange, though. Any changes go through no problem, but deleting part of a table doesn't.

Last edited by Sweetsour : 08-09-18 at 01:19 AM.
  Reply With Quote