That last "true" argument specifies whether the addon loads the "Default" profile when it's first loaded on a character that's never had it loaded before. This allows the user to configure that Default profile once, and then it's loaded on each subsequent toon.
But a few addons do not initialize the database this way, by omitting the "true" in the constructor. So each new character that loads that addon will either have to load a profile manually, or reconfigure for each character.
Now, I can see how some people would like to have a different configuration for each toon, but I can't imagine that's what most people want. A few of the AddOns I use regularly don't use default profiles, so I either have to configure them manually or go into the code and change the db initialization myself. I opt to do the latter, and this makes updating those addons a pain. (I won't mention which AddOns I'm talking about...)
You're definitely not alone in your dislike of the way default profiles are handled within AceDB. Most of us just learn to live with it or make the necessary changes ourselves.
I may be missing something, but it's not that much effort just to change the profile to default, using the in game profile manager for the addon, is it? It's only once ever per character per addon. Do you mean something else?
I may be missing something, but it's not that much effort just to hope you remember to change the profile to default for every addon which uses profiles, using the in game profile manager for the addon, and then also delete the extraneous character-specific profile, is it? It's only once ever per character per addon. Do you mean something else?
Fixed that for you. :-) Like Seerah says, it's smarter to work in the other direction.
Alright. I guess I'm not really that bothered personally. I always assumed they fully intended for profiles to be character specific by default, and I'm sure there are a lot of people that don't use the same settings on all characters.
It's the fact that it should not be set up this way in the first place. It's poor design choice.
There are very good reasons for having AceDB behave the way it is now, anyhow i'm sure the discussion can be found in the forum archives somewhere, and i will not go into it again.
Its a decision the addon developer has to make, its not our fault they don't think about their code when writing it. If there is anyone with a poor design, its those addons that didn't think if their options make sense per character or not.
For the record:
Assume an addon does not have options to change profiles (like sadly many do).
- Right now: The worst thing that can happen is that you need to setup your settings for every one of your chars. Annoying, sure, but every user can do it without editing any file.
- "Default" as default: You want character specific instead? Well, too bad! Only option you have is either edit the addon or its SV file, nothing a normal user is qualified todo.
Anyhow, the full reasoning can be found on the forums somewhere, i'm too lazy to look for it.
PS:
If the settings are so game breaking, wouldn't you notice that you forgot to change the profile?
The "hope to remember" clause makes it seem like the settings aren't all that important to begin with.
PPS:
Its in no way required to delete the old character specific profile, thats just your own OCD.
There are very good reasons for having AceDB behave the way it is now, anyhow i'm sure the discussion can be found in the forum archives somewhere, and i will not go into it again.
Somebody says that every time the subject comes up, but nobody can remember what the reasons are or find the discussion. The only thing the forum search can find is people complaining about it, and others saying that somewhere are good reasons. (This, more than anything else, is what makes me so cynical about the whole topic.)
Its a decision the addon developer has to make,
They don't "have" to do anything as long as :New allows them to drop arguments. If you wanted to push all the responsibility onto the addon developer, AceDB would require that parameter saying "use a default" or "use per-char" or whatever other behavior the author wants. When AceDB provides a default behavior, the responsibility for that behavior is AceDB's.
That, IMHO, would be even better than trying to find a default behavior to satisfy everyone: force the addon to specify instead of falling back on library defaults that people find questionable. Maybe the MoP/5.x expansion would be a good opportunity to solve this, when authors will be making updates anyhow...
If the settings are so game breaking, wouldn't you notice that you forgot to change the profile?
Would be lovely if that were true; in practice the differences don't crop up until mid-fight when you can't change them.
They don't "have" to do anything as long as :New allows them to drop arguments.
They don't have to, but if they don't, its their failure, not the APIs.
The default mode of operation was chosen for a reason (well, several), its not our fault if addon developers don't think about how they use an API.
PS:
Possible that the discussion took place on the old Jira tracker which was used during development of Ace3, which may or may not have vanished by now. Its been 3.5 years or so. :p
If you wanted to push all the responsibility onto the addon developer, AceDB would require that parameter saying "use a default" or "use per-char" or whatever other behavior the author wants. ... Maybe the MoP/5.x expansion would be a good opportunity to solve this, when authors will be making updates anyhow...
Agreed.
I currently have a standalone modified copy of AceDB in my addons folder with the minor version set to something like 999999999999 so it will always override whatever the real version is in the dozens of addons embedding it, but then I have to remember to check for actual updates to AceDB and update my modified copy accordingly. I play 6 characters, run about 150 addons, and very often try new addons. Having to change even one addon's profile to "Default" 6 times over is unacceptably annoying, especially when I forget to do it right away and only discover the problem mid-combat as Farmbuyer mentioned.
If you chose the current default mode based on the assumption that addon authors would be lazy and stupid, why wouldn't you just require a profile argument to :New based on the same assumption?
I have a batch script that I run whenever I update my addons that I use to make any necessary changes. I've found that it makes things like this much less tedious.
rem Ace3: MAKE ADDONS USE DEFAULT PROFILE
cd Ace3\AceDB-3.0
sed "s/defaultProfile or charKey/defaultProfile or \"Default\"/" AceDB-3.0.lua | unix2dos > AceDB-3.0.lua.tmp
if exist AceDB-3.0.lua.tmp (
del AceDB-3.0.lua
ren AceDB-3.0.lua.tmp AceDB-3.0.lua
)
cd ..\..
If you chose the current default mode based on the assumption that addon authors would be lazy and stupid, why wouldn't you just require a profile argument to :New based on the same assumption?
That would defeat the purpose of "lazy". :)
Besides, the option is not a "use default profile" boolean option. The option is "defaultProfile", which was designed to take a string specifying which profile should be the default.
Specifying a per-character profile there would mean you have to tell it "<name> - <Server>" (looking up two values), while specifying "Default" is just that, a plain string (which is also another reason it was designed this way).
That true got mapped to "Default" later on was just a convenience.
Anyhow, i still claim that you're wasting energy trying to blame AceDB, blame the authors that are not thinking. Ace3 was never meant to replace author stupidity, and we've always said that. Lazyness on the other hand, thats what all software is for. :p
I distinctly remember the same complaints back about Ace2 when everything defaulted to a shared "Default" profile, just the other way around.... <.<
Forcing addon authors to specify a default type ("global", "char", "realm", etc.) would have been a better solution. Addon authors would not have an option to be lazy, and any blame with annoying defaults would fall solely on the addon author. :p
I don't think -- or at least I hope -- that anyone is going to claim that AceDB is perfect and needs no more improvement.
The MoP expansion would be the ideal time to clean it up. Simply have :New test that parameter; if it's nil (not just false), then continue the existing behavior when calling the private init() but also print a warning (via message(), via error(), via simple print(), whatever). The users will know to complain to the addon author, but won't actually lose any functionality. Any addon authors who haven't already updated their single line of code to specify a default will receive a bug report quickly on, but it won't be gamebreaking behavior.
I generally approve of being lazy. But there's no reason to not try and improve quality of life for authors and users alike. Let's think of this as an opportunity.
We'll never break an existing API without changing the major version of the library, thats a guarantee we give to all developers using Ace3, and that as a change alone is not worth bumping to AceDB-3.1 or so.
Considering the vast amount of addons that just sit there and hopefully never break because of lack of an active author, such a thing would be mighty annoying for the users, i'm sure.
Bumping the major just for this is absolutely not happening. Even if i would agree that its the better choice, it does not warrant a whole new version, and does not even solve much, because most addons would just not switch.
Besides, like i mentioned in earlier posts, even with the default changed, then someone will complain about his settings changing for character X when he changes it on character Y. There never is a perfect solution that makes everyone happy. I have distinct memories about such complaints about AceDB-2.0, which had the opposite default to -3.0 now.
So I'm curious about something, and maybe some authors would like to comment on what they think about this.
In addons that use AceDB, there are two ways you can initialize it. Here's the way I do it in my AddOns:
That last "true" argument specifies whether the addon loads the "Default" profile when it's first loaded on a character that's never had it loaded before. This allows the user to configure that Default profile once, and then it's loaded on each subsequent toon.
But a few addons do not initialize the database this way, by omitting the "true" in the constructor. So each new character that loads that addon will either have to load a profile manually, or reconfigure for each character.
Now, I can see how some people would like to have a different configuration for each toon, but I can't imagine that's what most people want. A few of the AddOns I use regularly don't use default profiles, so I either have to configure them manually or go into the code and change the db initialization myself. I opt to do the latter, and this makes updating those addons a pain. (I won't mention which AddOns I'm talking about...)
Am I the only one that this drives crazy?
You are not.
http://forums.wowace.com/showthread.php?p=286728#post286728
I keep a tiny stub mod that, on loading, reaches into AceDB and monkey-patches the :New method to make the 4th parameter default to true.
You're definitely not alone in your dislike of the way default profiles are handled within AceDB. Most of us just learn to live with it or make the necessary changes ourselves.
I'm also just changing the db code
Fixed that for you. :-) Like Seerah says, it's smarter to work in the other direction.
There are very good reasons for having AceDB behave the way it is now, anyhow i'm sure the discussion can be found in the forum archives somewhere, and i will not go into it again.
Its a decision the addon developer has to make, its not our fault they don't think about their code when writing it. If there is anyone with a poor design, its those addons that didn't think if their options make sense per character or not.
For the record:
Assume an addon does not have options to change profiles (like sadly many do).
- Right now: The worst thing that can happen is that you need to setup your settings for every one of your chars. Annoying, sure, but every user can do it without editing any file.
- "Default" as default: You want character specific instead? Well, too bad! Only option you have is either edit the addon or its SV file, nothing a normal user is qualified todo.
Anyhow, the full reasoning can be found on the forums somewhere, i'm too lazy to look for it.
PS:
If the settings are so game breaking, wouldn't you notice that you forgot to change the profile?
The "hope to remember" clause makes it seem like the settings aren't all that important to begin with.
PPS:
Its in no way required to delete the old character specific profile, thats just your own OCD.
Somebody says that every time the subject comes up, but nobody can remember what the reasons are or find the discussion. The only thing the forum search can find is people complaining about it, and others saying that somewhere are good reasons. (This, more than anything else, is what makes me so cynical about the whole topic.)
They don't "have" to do anything as long as :New allows them to drop arguments. If you wanted to push all the responsibility onto the addon developer, AceDB would require that parameter saying "use a default" or "use per-char" or whatever other behavior the author wants. When AceDB provides a default behavior, the responsibility for that behavior is AceDB's.
That, IMHO, would be even better than trying to find a default behavior to satisfy everyone: force the addon to specify instead of falling back on library defaults that people find questionable. Maybe the MoP/5.x expansion would be a good opportunity to solve this, when authors will be making updates anyhow...
Would be lovely if that were true; in practice the differences don't crop up until mid-fight when you can't change them.
They don't have to, but if they don't, its their failure, not the APIs.
The default mode of operation was chosen for a reason (well, several), its not our fault if addon developers don't think about how they use an API.
PS:
Possible that the discussion took place on the old Jira tracker which was used during development of Ace3, which may or may not have vanished by now. Its been 3.5 years or so. :p
Agreed.
I currently have a standalone modified copy of AceDB in my addons folder with the minor version set to something like 999999999999 so it will always override whatever the real version is in the dozens of addons embedding it, but then I have to remember to check for actual updates to AceDB and update my modified copy accordingly. I play 6 characters, run about 150 addons, and very often try new addons. Having to change even one addon's profile to "Default" 6 times over is unacceptably annoying, especially when I forget to do it right away and only discover the problem mid-combat as Farmbuyer mentioned.
If you chose the current default mode based on the assumption that addon authors would be lazy and stupid, why wouldn't you just require a profile argument to :New based on the same assumption?
In this case, I use a Windows port of sed.
That would defeat the purpose of "lazy". :)
Besides, the option is not a "use default profile" boolean option. The option is "defaultProfile", which was designed to take a string specifying which profile should be the default.
Specifying a per-character profile there would mean you have to tell it "<name> - <Server>" (looking up two values), while specifying "Default" is just that, a plain string (which is also another reason it was designed this way).
That true got mapped to "Default" later on was just a convenience.
Anyhow, i still claim that you're wasting energy trying to blame AceDB, blame the authors that are not thinking. Ace3 was never meant to replace author stupidity, and we've always said that. Lazyness on the other hand, thats what all software is for. :p
I distinctly remember the same complaints back about Ace2 when everything defaulted to a shared "Default" profile, just the other way around.... <.<
The MoP expansion would be the ideal time to clean it up. Simply have :New test that parameter; if it's nil (not just false), then continue the existing behavior when calling the private init() but also print a warning (via message(), via error(), via simple print(), whatever). The users will know to complain to the addon author, but won't actually lose any functionality. Any addon authors who haven't already updated their single line of code to specify a default will receive a bug report quickly on, but it won't be gamebreaking behavior.
I generally approve of being lazy. But there's no reason to not try and improve quality of life for authors and users alike. Let's think of this as an opportunity.
Considering the vast amount of addons that just sit there and hopefully never break because of lack of an active author, such a thing would be mighty annoying for the users, i'm sure.
The AceDB docs all use ",true", so that's not where the problem lies.
Complain to individual authors is your only recourse.
Like Nev said, we will NOT be breaking APIs without bumping majors. Period.
I was wondering if it wasn't, say, possible to bump the AceDB major in the MoP release (if that was enough of a reason)
Besides, like i mentioned in earlier posts, even with the default changed, then someone will complain about his settings changing for character X when he changes it on character Y. There never is a perfect solution that makes everyone happy. I have distinct memories about such complaints about AceDB-2.0, which had the opposite default to -3.0 now.