I tried to ask over at wowinterface.com they said i should ask here so here goes.
Alot of my config options require a ReloadUI() right now its setup to pop up a staticpopup that will run ReloadUI() with ever config change.
What I'm looking for is a "APPLY" button in the lower right hand corner kinda like with the Blizzard Options screen where you can change things then hit the button and it will reload the UI.
I'm not aware of any configuration changes requiring a reloadui to apply unless we're talking about "removing" hooksecurefunc hooks or some very specific cases of playing with secure frames.
This looks more like a problem with how you've implemented your options than with Ace.
1. You set a variable (this is now in memory) and at the same time do whatever changes are supposed to happen in response.
2. If that variable is stored in saved variables it will persist to disk next time the user exits or logs out of the game.
Why do you need to /reloadui I don't understand.
Edit: What I mean is you can apply the changes in your
set = function(info, value)
-- apply changes to the addon from changing value
-- set value to my db for saving
end
I'm not aware of any configuration changes requiring a reloadui to apply unless we're talking about "removing" hooksecurefunc hooks or some very specific cases of playing with secure frames.
This looks more like a problem with how you've implemented your options than with Ace.
1. You set a variable (this is now in memory) and at the same time do whatever changes are supposed to happen in response.
2. If that variable is stored in saved variables it will persist to disk next time the user exits or logs out of the game.
Why do you need to /reloadui I don't understand.
Edit: What I mean is you can apply the changes in your
set = function(info, value)
-- apply changes to the addon from changing value
-- set value to my db for saving
end
I'm still new to this and trying to learn as i go. Alot of the lingo used i have to seach the net to find what it means. The Setfunction i am trying to use is as follows:
get = function(info) return db.powerbar.rune[ info[#info] ] end,
set = function(info, value) db.powerbar.rune[ info[#info] ] = value; end,
i think my biggest issue is trying use someone elses workings instead of trying to set things up myself.
I think its back to the drawing board to get this thing working right.
btw I created my main addon using the Tukui engine created by nightracker
----------------------------------
-- Engine to make all files communicate.
-- Credit Nightcracker
----------------------------------
-- including system
local addon, engine = ...
engine[1] = {} -- B, functions, constants
engine[2] = {} -- C, config
engine[3] = {} -- L, localization
engine[4] = {} -- DB, database, post config load
bdcUI = engine --Allow other addons to use Engine
--[[
This should be at the top of every file inside of the bdcUI AddOn:
local B, C, L, DB = unpack(select(2, ...))
This is how another addon imports the bdcUI engine:
local B, C, L, DB = unpack(bdcUI)
]]
With using this engine i setup a config file that all the "modules" in my addon use with "local B, C, L, DB = unpack(select(2, ...)) -- Import: B - function; C - config; L - locales; DB - Database". Now there has been only one person (that i know of) in the Tukui community that has made a GUI with Ace to run there UI. So i figured I would try there setup and was able to get it working with the changes i wanted to use instead of using the Default Tukui. I know its probably wrong and I'm learning now I should just start from scratch.
I will be back with more questions now that i'm going to give it a go.
First question on new setup is... With everything i want to add to the UI i have over 40 modules (most are for my datapanel) for different options. So the "Core" of the UI is going to be a 9,000 to 10,000 line file is that to much or does it matter?
I'm not even remotely sure what the point of setting up your addon that way is, and it doesn't seem to have any relevance to how your options work (or should work), but basically, if you have an option to change the font of something, instead of your set function doing this:
set = function(info, value)
addon.db.profile.font = value
ReloadUI()
end
... and then letting the initial setup function change the font when the UI reloads, just change the font directly without making the user wait for their UI to reload:
set = function(info, value)
addon.db.profile.font = value
local _, size, flags = fontstring:GetFont()
fontstring:SetFont(value, size, flags)
end
This still isn't the way you should be changing your settings. I know that I, as a user, would uninstall an addon (or UI) that controlled its options this way.
/edit: unless you're doing what Dridzt mentioned
I'm not aware of any configuration changes requiring a reloadui to apply unless we're talking about "removing" hooksecurefunc hooks or some very specific cases of playing with secure frames.
But we can't help you unless you start hearing us out. /shrug
I'm not aware of any configuration changes requiring a reloadui to apply unless we're talking about "removing" hooksecurefunc hooks or some very specific cases of playing with secure frames.
This.
ReloadUI() is not needed in >99.9% (I would say: in 100%) of all cases. ReloadUI() in any Configuration UI is simply very bad (UI) design: Config terror at it's best. Change your configuration code.
I'm still new to this and trying to learn as i go.
If you are new: Do not use any library unless you know the basics of Lua / WoW Lua/API/functions/events/ ... and unless you know and understand every single line of code of a library. Ace is complicated. The Ace Framework (each library) is for people who know how they can do the same without it.
Sorry.
If you are new: Do not use any library unless you know the basics of Lua / WoW Lua/API/functions/events/ ... and unless you know and understand every single line of code of a library. Ace is complicated. The Ace Framework (each library) is for people who know how they can do the same without it.
Sorry.
I strongly disagree with this statement, save for perhaps AceGUI (which was mostly intended for implementing AceConfigDialog) and the options tables for AceConfig: The Ace suite of libraries were intended as a framework for making AddOn development easier.
The only part of Ace I use is AceConfig. (But even a couple of my addons don't use this for the options window.) The rest I do without libraries. This way I know exactly what's going on and I continue to learn by doing so.
I can't live without the Ace libraries
I learned creating addons with it, and I sometimes found myself trying to use it even when it wasn't actually embedded
Whenever I have a simple addon I want to expand, I subconsciously start adding the Ace libs ><
Alot of my config options require a ReloadUI() right now its setup to pop up a staticpopup that will run ReloadUI() with ever config change.
What I'm looking for is a "APPLY" button in the lower right hand corner kinda like with the Blizzard Options screen where you can change things then hit the button and it will reload the UI.
Any suggestions?
Thanks
Coke
This looks more like a problem with how you've implemented your options than with Ace.
1. You set a variable (this is now in memory) and at the same time do whatever changes are supposed to happen in response.
2. If that variable is stored in saved variables it will persist to disk next time the user exits or logs out of the game.
Why do you need to /reloadui I don't understand.
Edit: What I mean is you can apply the changes in your
I'm still new to this and trying to learn as i go. Alot of the lingo used i have to seach the net to find what it means. The Setfunction i am trying to use is as follows:
The default file is as follows:
i think my biggest issue is trying use someone elses workings instead of trying to set things up myself.
I think its back to the drawing board to get this thing working right.
btw I created my main addon using the Tukui engine created by nightracker
With using this engine i setup a config file that all the "modules" in my addon use with "local B, C, L, DB = unpack(select(2, ...)) -- Import: B - function; C - config; L - locales; DB - Database". Now there has been only one person (that i know of) in the Tukui community that has made a GUI with Ace to run there UI. So i figured I would try there setup and was able to get it working with the changes i wanted to use instead of using the Default Tukui. I know its probably wrong and I'm learning now I should just start from scratch.
I will be back with more questions now that i'm going to give it a go.
First question on new setup is... With everything i want to add to the UI i have over 40 modules (most are for my datapanel) for different options. So the "Core" of the UI is going to be a 9,000 to 10,000 line file is that to much or does it matter?
... and then letting the initial setup function change the font when the UI reloads, just change the font directly without making the user wait for their UI to reload:
it creates a "Apply" button on the video options frame and is disabled untill a option changes then then reloads the UI once its applied.
Thanks
Coke
Edit:
Ok i figured out how make my APPLY button but i would like it to be outside the scrolling window of my options so its visable all the time.
here is the codeim using:
Thanks to everyone that helped.
/edit: unless you're doing what Dridzt mentioned
But we can't help you unless you start hearing us out. /shrug
This.
ReloadUI() is not needed in >99.9% (I would say: in 100%) of all cases. ReloadUI() in any Configuration UI is simply very bad (UI) design: Config terror at it's best. Change your configuration code.
If you are new: Do not use any library unless you know the basics of Lua / WoW Lua/API/functions/events/ ... and unless you know and understand every single line of code of a library. Ace is complicated. The Ace Framework (each library) is for people who know how they can do the same without it.
Sorry.
I strongly disagree with this statement, save for perhaps AceGUI (which was mostly intended for implementing AceConfigDialog) and the options tables for AceConfig: The Ace suite of libraries were intended as a framework for making AddOn development easier.
Just sayin'.
I learned creating addons with it, and I sometimes found myself trying to use it even when it wasn't actually embedded
Whenever I have a simple addon I want to expand, I subconsciously start adding the Ace libs ><