On 27/02/2008, Brian J. Tarricone <[EMAIL PROTECTED]> wrote: > > Pavel Syomin wrote: > > Hi, all! > > > > I had been experimenting with GtkBuilder using Gtk+ 2.12.5 from Fedora > > 8. I have found, that if there is reference to unknown type in UI-file, > > then application crashes. Is it a GtkBuilder bug? > > > > Test program: > > [snip] > > > > > Gtk-ERROR **: Invalid type: Unknown > > aborting... > > Segmentation fault > > > I'm guessing that's intentional. g_error() causes the program to abort, > so it looks like whoever did the parsing code in GtkBuilder intended the > app to abort if the UI description has errors. > > It's debatable as to whether or not this is the correct behavior, but > one could argue that, if your UI is corrupt, you can't really rely on > your program to work properly, and it could also cause harm to user data > -- basically you have no idea what will happen and your program's > behavior is undefined. > > It could also be seen as a way to increase the quality of GtkBuilder UI > description files that end up out in the wild. App developers will do a > much better job of making sure their UI files are correct if incorrect > files cause the app to abort.
Hmmm. This sounds like a very narrow minded decision to me. I have been planning to write write a framework where one can send GtkBuilder XML snippets to a DBus service and have that service embed this as out of process plugins. The described GtkBuilder behavior forces me to write a separate validator before I pass it to the GtkBuilder. Bugger. Cheers, Mikkel
_______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list