Re: GConf - defaults.
- From: Havoc Pennington <hp redhat com>
- To: Dietmar Maurer <dietmar ximian com>
- Cc: Michael Meeks <michael ximian com>, Elliot Lee <sopwith redhat com>, gnome-hackers gnome org
- Subject: Re: GConf - defaults.
- Date: 21 Jun 2001 09:57:40 -0400
Dietmar Maurer <dietmar ximian com> writes:
> I think there are several type of errors, for example:
>
> - the program does not find a default value at all (missing schema)
>
> - the backend delivers a value with a wrong type
>
> - something is wrong with the backend.
>
> IMO the program should always do something reasonable, and its not
> much work to implement that.
>
I agree you have to handle "wrong type value" and "backend is hosed"
since admins can easily cause that. But the obvious way to handle
those is to fall back to the default.
That's why I think making defaults really dependable is the best
route.
Defaults in code is major major bad evil. How do you do that for
settings that span pretty much all apps? (e.g. user level)
The only sane way to do it would be to have a library function
get_user_level() which handled the coded default. But talk about API
bloat.
And as I said, already we had several hard-to-fix bugs that we fixed
for Red Hat caused by defaults out-of-sync (mostly between control
center and other places). I consider this a genuine not theoretical
issue.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]