Which would add everything to one window in the blizz options window. It looks ugly.
What I want to do is have sub-categories, while still maintaining the slash commands.
So, this is what I've done:
local function giveProfiles()
local profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(addon.db)
local AceConfigReg = LibStub("AceConfigRegistry-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
self.db = LibStub("AceDB-3.0"):New("AckisRecipeListDB",defaults,"Default")
-- Create the options with Ace3
-- Add the options to blizzard frame
self.optionsFrame = AceConfigDialog:AddToBlizOptions("AckisRecipeList", "Ackis Recipe List")
AceConfigDialog:AddToBlizOptions("ARL Display", "Display", "AckisRecipeList")
AceConfigDialog:AddToBlizOptions("ARL Filter", "Filter", "AckisRecipeList")
AceConfigDialog:AddToBlizOptions("ARL Profile", "Profile", "AckisRecipeList")
-- Register slash commands
if not input or input:trim() == "" then
LibStub("AceConfigCmd-3.0"):HandleCommand("arl", "AckisRecipeList", input)
Now this works kind of.
I can't access profiles via slash command anymore which is what I'm trying to solve. The rest of the options still show up in the main window, however I can adjust that with some more time.
Look at recount's code (Recount.lua contains it). You need two option tables, one with separate subgroups for AddBliz and one for command line.
I do a deepcopy of the root part of the tree, generate the subtrees separately, and insert the subtrees into one of the copies. This copy will then be fed for aceconfig, the second root plus all the separate subtrees are feed to blizz ui via a chain of AddBliz options.
By doing this you retain full aceconfig functionality for all non bliz UIs and the same, with good subtree use for the bliz one. All slash commands will be available as before, including profile ones.
I agree that adding a full config table via addbliz looks ugly hence I Jira'd that it be default behavior that AddBliz creates the subcategories for the first level groups, but it was essentially denied. Hence you are kind of forced to have double tables to achieve this gracefully.