Why even use a schema at all?

Most of yesterdays post was based around generating and installing a GConf schema.

After further thought, why even use a schema at all? We don’t really want to be relying on external tools such as gconftool-2 to install the default keys on a per-user basis, and gconfsharp-schemagen is too basic for our needs.

So the new plan is just to write a Beagle.Util.Conf class which makes reading and manipulating settings easy to the rest of the code, leaving a possible window of opportunity for some automation to create this at compile-time in the future.

As for installing default setting keys, this seems easy enough even without a schema. Monodoc contains this code snippet:

try
{
MyVal = (string) gconfClient.Get ("/apps/monoapps/SampleApp/setting1"));
}
catch (GConf.NoSuchKeyException)
{
gconfClient.Set ("/apps/monoapps/SampleApp/setting1", "sample");
}

…which pretty much tells me all I need to know.