Thanks, that worked but I'll have to go back to Tablet anyway since I do not want to force users to only watch items for 1 or 2 factions and without a scrollbar it's not possible to see what extends beyond bottom of screen.
Thanks again, got everything working with one minor exception. In the Set functions I don't exactly understand how to get the actual Item I'm selecting. It is using the key|value pair from the values table but I'm getting blank if I use value and just the number if I use key, I need to set the db variable to the name, here is my functions.
function FactionItems:SetCountDisplay(key,value)
if key then
FactionItems.db.profile.Watch.countDisplayStyle = value
--- Refresh in place
FactionItems:UpdateDisplay()
end
end
function FactionItems:SetCharacterDisplay(key,value)
if key then
FactionItems.db.profile.Watch.currentCharacter = value
--- Refresh in place
FactionItems:UpdateDisplay()
end
end
was hoping I copuld get a bit of help with a few issues I'm having? First issue is an error that keeps telling me I have overlapping cells:
"Broker_FactionItems-0.1.0\\BrokerFactionItems.lua:987: overlapping cells at column 2\nLibQTip-1.0-9 (LibQTip-1.0):473: in function <...rface\\AddOns\\LibQTip-1.0\\LibQTip-1.0\\LibQTip-1.0.lua:412>\n(tail call): ?:\nBroker_FactionItems-0.1.0\\BrokerFactionItems.lua:987: in function `OnEnter'\nBroker2FuBar-1.0\\pluginPrototype.lua:58: in function `OnFuBarEnter'
Second issue is more of a question, My tooltip can get quite long if the user wants to watch many Factions, is there a way to add a scroll bar? Currently the tooltip will only go tothe bottom of the screen then everything below is cut off since cannot scroll.
Thanks Xinhuan, I got it mostly working now. The issue was where you thought, I changed the countDisplay and AltCharacter options to use the values = foo instead of validate and loaded the foo variable before the options. I have one last issue though and I think I have it fixed but have to wait till I get home. I was getting the following error for bot set functions:
"AceConfigDialog-3.0-26:780: Method SetCharacterDisplay doesn't exist in handler for type func
I added a handler to the options below this morning but not sure if I did it correctly.
DisplayOptions = {
order = 3,
handler = FactionItems
type = 'group',
name = "Display",
desc = "Text display configuration",
args = {
header2 = {
order = 31,
type = "header",
name = "Display",
},
countDisplay = {
order = 35,
type = "select",
name = "countDisplay",
desc = "selects displaying bank and bags item totals in FuBar panel",
values = countDisplayType,
set = "SetCountDisplay",
get = function()
return FactionItems.db.profile.Watch.countDisplayStyle
end,
},
AltCharacter = {
order = 40,
type = "select",
name = "Alternate Characters",
desc = "Alternate Character Faction items to view",
values = V.chars,
set = "SetCharacterDisplay",
get = function()
return FactionItems.db.profile.Watch.currentCharacter
end,
},
},
}
end
FactionItems:GetCharListByServerId()
return DisplayOptions
end
Thanks Xihuan, I will enable show Lua Errors when I get home.
As to declaring currentCharacters prior to options table I did that, not quite sure what you meant by upvalue. I had the following lines below stated just before the options table was declared
local currentRealm, currentFaction, currentCharacter
local optionsFrame
can I use currentCharacter = UnitName("player") before the OnInitialize function runs? If so I will add this below the 'local optionsFrame' statement and the options table start.
My error sorry, i copied from wrong branch I had already made the fix for AceCfgDialog to the two others and the change to lower case o for options.
I'm wondering If I have something wrong in the args sections since it creates the main title, and expands to the Faction Watch and Display titles. When you click on any of these though nothing gets displayed as option choices.
Here is a my code at the start that declares Ace libraries and the profile section of my default database:
I'm trying to get my options to show up inthe Blizzrd UI, I was able to get the Addon Name, and the different sections to list but the actual options that should be displayed to the Right are blank. Below is a section of my options table and the code I use to load the options. Thanks for any help that can be provided.
local options = {
type = 'group',
name = "Broker_FactionItems",
args = {
general = {
type = 'group',
name = "General Options",
desc = "General Addon Information",
order = 1,
args = {
header1 = {
order = 11,
type = "header",
name = "General Information",
},
desc = {
order = 12,
type = "description",
name = "Watch items for Faction Rep gain",
},
},
},
FactionWatch = {
order = 2,
type = 'group',
name = "Faction Watch Options",
desc = "Watch Options for what Factions to monitor Items for",
args = {
header1 = {
order = 21,
type = "header",
name = "Faction Watch",
},
desc = {
order = 22,
type = "description",
name = "Watch Options",
},
ArgentDawn = {
order = 23,
name = "Argent Dawn",type = 'toggle',
desc = "toggles watching items for Argent Dawn",
usage = "watch ArgentDawn",
get = function()
return FactionItems.db.profile.Watch["Argent Dawn"]
end,
set = function(v)
FactionItems.db.profile.Watch["Argent Dawn"] = not FactionItems.db.profile.Watch["Argent Dawn"]
--- Refresh in place
FactionItems:UpdateDisplay()
end,
},
},
},
DisplayOptions = {
order = 3,
type = 'group',
name = "Display",
desc = "Text display configuration",
args = {
header2 = {
order = 31,
type = "header",
name = "Display",
},
countDisplay = {
order = 35,
type = 'text',
name = "countDisplay",
desc = "toggles displaying bank and bags item totals in FuBar panel",
get = function()
return FactionItems.db.profile.Watch.countDisplayStyle
end,
set = function(option)
FactionItems.db.profile.Watch.countDisplayStyle = option
--- Refresh in place
FactionItems:UpdateDisplay()
end,
validate = {"bags", "bank", "bankSlashbag","bagsPlusbank","none"},
},
AltCharacter = {
order = 36,
type = 'text',
name = "Alternate Characters",
desc = "Alternate Character Faction items to view",
get = function()
return currentCharacter
end,
set = function(altChar)
currentCharacter = altChar
-- displayCharacter = FactionItems.db.profile
FactionItems:UpdateDisplay()
end,
validate = {"none"},
},
},
},
},
}
function FactionItems:SetupOptions()
options.args.profile = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db)
AceCfg:RegisterOptionsTable("Broker_FactionItems", options)
FactionItems.optionsFrame = AceCfgDialog:AddToBlizOptions("FactionItems", "Broker_FactionItems", nil, "general")
FactionItems.optionsFrame.FactionWatch = AceCfgDialog:AddToBlizOptions("Broker_FactionItems", "Watch", "Broker_FactionItems", "FactionWatch")
FactionItems.optionsFrame.DisplayOptions = AceCfgDialog:AddToBlizOptions("Broker_FactionItems", "Display", "Broker_FactionItems", "DisplayOptions")
end
function FactionItems:OnInitialize()
self.db = LibStub("AceDB-3.0"):New("BrokerFactionItemsDB",self.loc.data)
self:GetCharListByServerId()
for _,charName in pairs(V.chars) do
table.insert(options.args.DisplayOptions.args.AltCharacter.validate, charName)
end
FactionItems:SetupOptions()
end
Working on converting my addon from Ace2 - Fubar to Ace3 w/LDB, the problem that I seem to be having a hard time seeing the light with is my default values, I currently have the following in a lua file that is called first.
And still get the exact same error message. The error message references an Ace3 Timer but I am not running Ace3... I do run many Ace addons but as far as I know none of them are running Ace3.
Is this Ace3 Timer a lib I need?
Well I guess your wrong, if you read the description of the addon, it's an Ace3 version of KoTJ so you need to have the Ace3 libraries since the developer did not include it as embedded libraries.
Sorry Toad, I overreacted, thought you were referring to me in that post. Anyways, I am getting this error once at the beginning of combat, only in raids. It doesnt have to be in the instance either. I can recreate it pretty much anywhere. It's the raid part that throws me. Solo is fine. Like I said, I will start disabling Addons to see what might be conflicting.
I would guess that some other Ace Raid addon is causing a Tainted Event to be risen and as it rides up the Code chain Autobar which starts with an 'A' and probably holds the Ace libraries for you get reported. What Ace based Raid Addons are you running?
You can easily test this by turning Autobar off and you will probably see the next Ace addon on the alphabetical order give the errors, or you can just use your raid addons and probably get a more specific error.
0
0
0
"Skinner-b1.9551.1 \\options.lua:281: attempt to index global 'AceGUIWidgetLSMlists' (a nil value)\n
0
"Broker_FactionItems-0.1.0\\BrokerFactionItems.lua:987: overlapping cells at column 2\nLibQTip-1.0-9 (LibQTip-1.0):473: in function <...rface\\AddOns\\LibQTip-1.0\\LibQTip-1.0\\LibQTip-1.0.lua:412>\n(tail call): ?:\nBroker_FactionItems-0.1.0\\BrokerFactionItems.lua:987: in function `OnEnter'\nBroker2FuBar-1.0\\pluginPrototype.lua:58: in function `OnFuBarEnter'
here is the code thats causing the issue:
Second issue is more of a question, My tooltip can get quite long if the user wants to watch many Factions, is there a way to add a scroll bar? Currently the tooltip will only go tothe bottom of the screen then everything below is cut off since cannot scroll.
0
"AceConfigDialog-3.0-26:780: Method SetCharacterDisplay doesn't exist in handler for type func
I added a handler to the options below this morning but not sure if I did it correctly.
0
As to declaring currentCharacters prior to options table I did that, not quite sure what you meant by upvalue. I had the following lines below stated just before the options table was declared
can I use currentCharacter = UnitName("player") before the OnInitialize function runs? If so I will add this below the 'local optionsFrame' statement and the options table start.
0
pastey.net link is: http://ace.pastey.net/109229-224s
0
0
I'm wondering If I have something wrong in the args sections since it creates the main title, and expands to the Faction Watch and Display titles. When you click on any of these though nothing gets displayed as option choices.
Here is a my code at the start that declares Ace libraries and the profile section of my default database:
0
0
0
From what I'm reading for AceDB3 you use:
do I just remove FactionItems:RegisterDefaults('account',{
and use the data table and call it defaults (or I could rename defaults as data)?
Thanks for Help!
0
0
Well I guess your wrong, if you read the description of the addon, it's an Ace3 version of KoTJ so you need to have the Ace3 libraries since the developer did not include it as embedded libraries.
0
I would guess that some other Ace Raid addon is causing a Tainted Event to be risen and as it rides up the Code chain Autobar which starts with an 'A' and probably holds the Ace libraries for you get reported. What Ace based Raid Addons are you running?
You can easily test this by turning Autobar off and you will probably see the next Ace addon on the alphabetical order give the errors, or you can just use your raid addons and probably get a more specific error.