Hi,
You should implement Gee.Iterable interface.
2008/8/18 Alessandro Pellizzari
<alex amiran it>
Hi all,
I would like to create a couple of classes and use them as collections.
For example:
public class MyList()
{
protected List<MyObject> objects = new ArrayList<MyObject>;
...
}
public class MyObject()
{
protected string mydata;
}
And I would like to code like this:
var l = new MyList();
l.populate(blah blah);
foreach(MyObject o in l) {
printf(o.getData());
}
First of all: is it possible?
And, if yes, how? :)
What classes/interfaces should I inherit from?
Thank you very much.
--
Alessandro Pellizzari
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
--
Nicolas Joseph
Responsable de la rubrique GTK+ de
developpez.com /
In charge of the GTK+ section on
developpez.com
http://nicolasj.developpez.com