[g-a-devel]Re: Gconf and gnome_program_init errors



Hi Paul,

On Mon, 2002-08-19 at 13:04, Sprencz Pal Csongor wrote:
> The first issue is in the gconf. I reported this bug on bugzilla with 90843 
> number.

	Apparently that's a feature; I'd view it as a bug personally but ...
there you go.

> The problem is, when I try to read a key from an empty configuration file (or 
> the key doesn't exist in the file). When calling the gconf_client_get_xxx() 
> api, it doesn't return an error message in GError structure (GCONF_BAD_KEY or 
> anything else) about  the key that doesn't exist. The returned value by these 
> functions is 0, and it is not good for me in more cases.

	If you want to detect if GConf is not working; it _seems_ the canonical
way is to install a schema with a value like
'/apps/gnopernicus/always_true' that is always true - fetch it and if
it's false then gconf is mis-behaving, so exit sooner rather than later.

	That aside; you should be installing a schema file with all the
applications defaults included - it's a serious bug that gnopernicus is
not doing this.

	See (eg.) libgnome/schemas/ to see how that's done - essentially you
supply a default value, documentation etc. for each key [ this is as
used in gconf-editor ].

> The second issue is with gnome_init_with_popt_table() or gnome_program_init() 
> and, poptGetArgs(). This problem I detected at nautilus too.
...
> If run the application with invalid argument, like:
> /application --sdfgh
> the poptGetArgs() api doesn't return anything about that wrong argument,
> and the application is working.

	Extraordinary indeed, this does seem to be a general bug in
gnome-program; 'gedit --frobincation' indicates that; then again it may
be a feature to allow easoteric command line arrangements; if you're
unsure file a bug against gnome-program (libgnome).

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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