Re: Checking for a non-existant key?
- From: Havoc Pennington <hp redhat com>
- To: Archit Baweja <bighead users sourceforge net>
- Cc: gconf-list gnome org
- Subject: Re: Checking for a non-existant key?
- Date: 05 Jul 2002 17:32:38 -0400
Archit Baweja <bighead users sourceforge net> writes:
>
> Here is the scenario. I have a key say "/apps/foobar/something" which is of
> (or is supposed to be) type boolean. The very first time I run my program, how
> do I check if the key exists or not? I want to know this, so that I can setup
> default values in the prefs for my app.
>
As Christophe says, the general idea is that the default is returned
from gconf_client_get_bool(), because of the schemas.
But if you really care if the value exists, you need to use
gconf_client_get() instead of get_bool(), and see if it's NULL.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]