[Vala] List object or ArrayList



Hi Yu

I forget to say that I had problem with List object.  I mean. I confused List with ArrayList even though I seen that ArrayList inherit from List.
I need a container where save all the lines of a file and than order it in alphabetical order.

so I created a test code like this :

List<string>  list  = new List<string>();

list.Append("uno");
list.Append("due");
list.Append("tre");
list.Append("quattro");

list.Sort(Gtk.strcmp);

with this code :
1. I wrong defining List in place of ArrayList, but :
2- This code doesn't compile at line  
List.Sort(Gtk.strcmp); I don't know why.
3. I read that to use ArrayList I must have Libgee-1.0 installed  and have to define using Gee; directive.
4. I don't have
Libgee-1.0 installed in windows env. nor I am able to compile from  libgee-0.1.5.tar.gz package with Mingw.

What could you suggest me either how to use List.Sort .... How to get
libgee-0.1.5 dll installed.

Thanks you Yu.






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