Thanks!
Code:
local button = _G[barName .. 'Button' .. j]
local slot = button:GetPagedID() or button:CalculateAction() or button:GetAttribute('action')
works great.
although, could you explain why
Code:
function AMine:getListFromDB(DB)
local items = {}
if DB == nil then return "dbEmpty" end
for index, value in pairs(DB)do
tinsert(items, index)
end
return items
end
button = _G[barName .. 'Button' .. j]
print(self.getListFromDB(button))
yields dbEmpty instead of a slot number?