Go Back   WowAce Forums > General > General Chat

Reply
 
Thread Tools
Old 12-08-2011   #1
Daedhir
Member
 
Daedhir's Avatar
 
Join Date: Nov 2007
Posts: 24
Default AceDB and default profiles (Picking a bone)

Hi, all.

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:

Code:
self.db = LibStub("AceDB-3.0"):New("MyAwesomeAddonDB", defaults, true)
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?
Daedhir is offline   Reply With Quote
Old 12-08-2011   #2
Farmbuyer
Amazing Member
 
Farmbuyer's Avatar
 
Join Date: Feb 2005
Posts: 1,107
Default Re: AceDB and default profiles (Picking a bone)

Quote:
Originally Posted by Daedhir View Post
Am I the only one that this drives crazy?
You are not.

http://forums.wowace.com/showthread....728#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.
__________________
In wizardry, one must often be willing to consider serendipitous events as unqualified successes. -Vaarsuvius
Farmbuyer is offline   Reply With Quote
Old 12-08-2011   #3
gamemaster128
Senior Member
 
gamemaster128's Avatar
 
Join Date: Oct 2008
Location: Portland, OR (USA)
Posts: 422
Default Re: AceDB and default profiles (Picking a bone)

Quote:
Originally Posted by Daedhir View Post
Am I the only one that this drives crazy?
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.
gamemaster128 is offline   Reply With Quote
Old 12-08-2011   #4
Ketho
Senior Member
 
Ketho's Avatar
 
Join Date: Dec 2008
Location: The Netherlands
Posts: 252
Default Re: AceDB and default profiles (Picking a bone)

+1

I'm also just changing the db code
__________________

Last edited by Ketho; 12-08-2011 at 10:26 PM.
Ketho is offline   Reply With Quote
Old 12-29-2011   #5
Lombra
Senior Member
 
Lombra's Avatar
 
Join Date: Jan 2006
Location: Sweden
Posts: 396
Default Re: AceDB and default profiles (Picking a bone)

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?
__________________
Grab your sword and fight the Horde!

Shattered Hand-EU
Lombra is offline   Reply With Quote
Old 12-30-2011   #6
Seerah
Legendary Member
 
Seerah's Avatar
 
Join Date: May 2006
Posts: 6,606
Default Re: AceDB and default profiles (Picking a bone)

It's the fact that it should not be set up this way in the first place. It's poor design choice.
__________________
Seerah is offline   Reply With Quote
Old 12-30-2011   #7
Farmbuyer
Amazing Member
 
Farmbuyer's Avatar
 
Join Date: Feb 2005
Posts: 1,107
Default Re: AceDB and default profiles (Picking a bone)

Quote:
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.
__________________
In wizardry, one must often be willing to consider serendipitous events as unqualified successes. -Vaarsuvius
Farmbuyer is offline   Reply With Quote
Old 12-30-2011   #8
Lombra
Senior Member
 
Lombra's Avatar
 
Join Date: Jan 2006
Location: Sweden
Posts: 396
Default Re: AceDB and default profiles (Picking a bone)

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.
__________________
Grab your sword and fight the Horde!

Shattered Hand-EU
Lombra is offline   Reply With Quote
Old 12-30-2011   #9
Nevcairiel
Super Moderator
 
Nevcairiel's Avatar
 
Join Date: Aug 2005
Location: Germany/Hamburg
Posts: 1,795
Default Re: AceDB and default profiles (Picking a bone)

Quote:
Originally Posted by Seerah View Post
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.
__________________
Author/Maintainer of Ace3, Bartender4, Mapster, Quartz, HotCandy, and various small and helpful addons.
You can Donate if you want, any help is appreciated!
Nevcairiel is offline   Reply With Quote
Old 12-30-2011   #10
Farmbuyer
Amazing Member
 
Farmbuyer's Avatar
 
Join Date: Feb 2005
Posts: 1,107
Default Re: AceDB and default profiles (Picking a bone)

Quote:
Originally Posted by Nevcairiel View Post
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.)


Quote:
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...

Quote:
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.
__________________
In wizardry, one must often be willing to consider serendipitous events as unqualified successes. -Vaarsuvius
Farmbuyer is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:23 PM.