[Vala] List problem in Valide



@ Nicolas
I have problems with valide 4.0 version in windows env.

My example is :

using GLib;

      SList<string> list = new SList<string> ();
          list.append ("one");
          list.append ("two");
          list.append ("three");
          list.append ("four");

now if I write the sort function with first letter in uppercase like list.Sort the compiler doesn't warning any error, simply don't compile.
while if  manually compile on command line this way, I get the error:

main.vala:376.13-376.21: error: The name `Sort' does not exist in the context of `GLib.SList<string>'
           list.Sort(strcmp);
           ^^^^^^^^^
also I have problems with indexeder and find functions; If I write code like this:

string key = "three";
int ix = list.index(key);        //  In this line I get -1

string foundkey =  (string)list.find(key);    // in this line i get null

stdout.printf ("%s %d \n", foundkey, ix );
Where I am wrong  ? Is there some error in  my settings ?.

@Nicolas Joseph ,
Could you also post a windows version of libgee-1.0.dll ??





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