Re: About gsettings aborting on unkown schemas



2011/5/27 Havoc Pennington <hp pobox com>:
> Config schemas that contain type checking and default values are part
> of the program; the program is either incorrect, or redundant in a way
> likely to create bugs, without the schemas. If schemas were just docs
> or something, it would be a different situation.

I think it's OK for schemas to be mandatory for programs, but problems
start when the program has several optional modules or plugins with
each having their own schemas, and the main program does not require
any of those optional modules to meaningfully work. So g_settings_new
unconditionally aborting might not be a bug, but it is very
inconvenient for the programmer.

I think the following could be done to fix this problem:
a) provide a function called g_settings_schema_exists that would check
whether creation of GSettings for a given schema name would succeed
b) provide g_settings_try_new as suggested before

Regards, Krzysztof


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