Re: GtkBuilder bug?



On Wed, Feb 27, 2008 at 8:58 PM, Peter Clifton <pcjc2 cam ac uk> wrote:

It can be user-data... I've experimented with using libglade to add
user-defined widgets to a schematic editor's canvas, and a crash / abort
is NOT what we want when the user hand-edits the XML and makes a
mistake.

Actually, there _was_ a bug in libglade, (now fixed) which caused it to
corrupt memory and crash if passed bad XML. (I discovered it with this
very test-case, my badly hand-edited XML.)


There are 2 issues in question here, on one hand, its probably fine to error
out on a bad xml provided that the xml is considered a base requirement
for the program to run, and also provided that a proper error message is
printed citing which line in the xml was faulty and for what reason it errored out
(bad type, aborting, segfault could probably be improved in this case).

The other issue is that the builder is essentially an object deserializer
that happens to be used for widget objects, the fact that it went into
gtk+ instead of gobject was debated and as I recall it was put into gtk+
because it had been written that way and there was a release date up
ahead.

As the code stands right now its still quite flexible, IMO it would be a
bit of a shame to rule out use cases that arent strictly "my app's xml file",
its just as easy to say that a software has bugs or that it can be improved
as it is easy to say "just dont use it that way".

Cheers,
               -Tristan



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