Re: my libglade hacks
- From: Jonathan Blandford <jrb redhat com>
- To: George <jirka 5z com>
- Cc: Michael Meeks <michael ximian com>, gnome-2-0 <gnome-2-0-list gnome org>, James Henstridge <james daa com au>
- Subject: Re: my libglade hacks
- Date: 25 Oct 2001 19:01:13 -0400
George <jirka 5z com> writes:
> On Wed, Oct 24, 2001 at 10:30:30PM -0400, Michael Meeks wrote:
> > On Wed, 24 Oct 2001, George wrote:
> > > Or, if people write sane code they have type checks when getting a
> > > widget from libglade. I have a piece of code called glade-helper in
> > > vicious-extensions, which does a type check and informs the user in a
> > > dialog that the installation is corrupted if it doesn't get the right
> > > widget type.
> >
> > Yes - that'd be really useful in some ways; we used to have a lot
> > of problems like this in gnumeric before we started installing the glade
> > files in versioned directories. More useful than the precice type would be
> > simply to check that a set of named widgets exist in the XML file, and
> > will return non-NULL when we suck them out.
>
> That could work as well. Actually prolly doing both would be good. First
> on loading a file give a set of widgets, second on each get check type
> automatically. The biggest thing is that it needs to tell the user that
> something is wrong. For a GUI user it's impossible to tell what went wrong
> when the app dies. If it tells him his installation is fucked, he knows who
> to blame it on.
>
> The good thing about checking when you are getting/using the widget is that
> you don't forget to update that check. The disadvantage is that the warning
> only comes up when you reach that part of the code, not when you load the
> file / start the app.
>
> I think an approach such as (two methods)
>
> GladeXML *xml;
> xml = load_check ("file.glade", "toplevel", TOPLEVEL_WIDGET_TYPE,
> "extra_widget_check", EXTRA_WIDGET_TYPE,
> "extra_widget2_check", EXTRA_WIDGET2_TYPE,
> NULL);
I'd rather see versioning checks, rather then this, which is:
1) A pain to keep in sink
2) Not guaranteed to be correct, anyway
Lets add some form of versioning to the xml file, and add a check for
it to libglade.
Thanks,
-Jonathan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]