[gtkada] GtkBuilder in GtkAda?

Arnaud Charlet charlet at adacore.com
Thu Jun 25 08:45:04 CEST 2009


> How would the corresponding GtkAda procedure/function declaration look? 
> A straightforward translation could be (package Gtk.Builder):
> function Add_From_File (Builder : Gtk_Builder; Filename : String; Error : Glib.GError.GError_Access) return Glib.Guint;
> 
> Should I use exceptions in case of an error? Another option is to return null on a successful call, i.e.:
> function Add_From_File (Builder : Gtk_Builder; Filename : String) return Glib.Error.GError;

Right, that's what we do in e.g. gtk-file_chooser.ad{s,b}, so I'd suggest doing
the same (return null on a successful call).

Arno



More information about the gtkada mailing list