[gtkada] gtk.list

Stephen Leake stephen_leake at acm.org
Thu May 30 02:35:53 CEST 2002


Emmanuel Briot <briot at ACT-Europe.FR> writes:

> Preben Randhol <randhol at pvv.org> writes:
> 
> > Stephen Leake <stephen_leake at acm.org> wrote on 28/05/2002 (11:45) :
> > > I just figured out how to use a gtk list, and I have a suggestion.
> > 
> > Isn't this package semi-obsolete now and obsolete in GtkAda 2.0 ? I was
> > always told to use Clist over List.
> 
> 
> It is semi-obsolete in both. Basically, they have kept it in GtkAda
> 2.0 because it is still used by Gtk.Combo internally. However, it is
> recommended that you use gtk-clist instead in your own code, this is
> much more flexible, or even the more complex, but even more flexible
> gtk.tree_view in GtkAda 2.0.

Is this "obsolete" in the Ada annex J sense? Meaning Gtk.List will
always be there, so I can use it. But some people think I shouldn't.

Or is there a real chance Gtk.List will actually disappear. I'm not
sure what the Gtk project policy on this is.

> The reason we do not use a List_Item_List is to avoid doing too many
> generic instantiations in GtkAda itself, and so we can reduce the
> footprint of GtkAda a little.

Hmm. Time for GNAT to implement shared generics :).

But seriously, Glib.Glist.Generic_List is a very thin binding to the C
code, so you've essentially got a shared body generic here anyway. How
much footprint growth are we talking about?

I guess I can accept this argument. But it definitely lessens one of
the advantages of using Ada; the Gtk.List interface is _not_ type
checked at compile time.

And to turn the argument around; I'd like to reduce the footprint of
my code, so I'd like to use the simpler Gtk.List if it meets my needs!

> But it would need some comments indeed.

Both that it is "obsolete", and that the items need to be List_Items.
And exactly what "obsolete" means.

-- 
-- Stephe





More information about the gtkada mailing list