[Vala] GLib.List error



i have below code:

          var icon_list = new List<Pixbuf> (); 
          int[] sizes = { 16, 32, 48, 64 };

          foreach (var size in sizes)
            {   
              var pixbuf = icon_theme.load_icon ("eshare", size, 0); 
              icon_list.append (pixbuf);
            }   
          set_default_icon_list (icon_list);

compile above code got below error:

 error: `GLib.List' does not have a default constructor

the error was generate by first line:
  var icon_list = new List<Pixbuf> ();

i use vala 0.7.8, glib-2.22.3, gtk+-2.18.6

thanks.


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