Re: Checking for a non-existant key?



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

Why don't you use a GConf schema for that ? Defining default values for
prefs is exactly the purpose of those schemas.

cf http://www.gnome.org/projects/gconf/

Christophe




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