Re: GConf - defaults.

Hi Havoc,

I do not suggest to remove the ability to get default values from the
configuration engine. But what do you do when:

gconf_client_get_int (c, "user_level", ...)

fails? Do you exit the program? I suggested to do something useful instead.

- Dietmar

Havoc Pennington wrote:

> 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
> _______________________________________________
> gnome-hackers mailing list
> gnome-hackers gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]