Re: [Vala] CRITICAL **: vala_ccode_fragment_append: assertion `VALA_IS_CCODE_FRAGMENT (self)' failed



Problem file attached;

valac --pkg=gtk+-2.0 --pkg=gee-1.0 -o test TreeViewColumnList.vala

** (valac:16644): CRITICAL **: vala_ccode_fragment_append: assertion `VALA_IS_CCODE_FRAGMENT (self)' failed

** (valac:16644): CRITICAL **: vala_ccode_fragment_append: assertion `VALA_IS_CCODE_FRAGMENT (self)' failed

** (valac:16644): CRITICAL **: vala_ccode_fragment_append: assertion `VALA_IS_CCODE_FRAGMENT (self)' failed

** (valac:16644): CRITICAL **: vala_ccode_fragment_append: assertion `VALA_IS_CCODE_FRAGMENT (self)' failed

** (valac:16644): CRITICAL **: vala_ccode_fragment_append: assertion `VALA_IS_CCODE_FRAGMENT (self)' failed

** (valac:16644): CRITICAL **: vala_ccode_fragment_append: assertion `VALA_IS_CCODE_FRAGMENT (self)' failed

namespace Info {

  public struct TreeViewColumnState {
        public bool clickable = true;
        public bool reorderable = true;
        public bool resizable = true;
        public bool sort_indicator = true;
        public int spacing = 5;
        public bool visible = true;
        }

  public class TreeViewColumnList : GLib.Object  {
    public Gee.ArrayList <Gtk.TreeViewColumn> items;

    construct {
      items = new Gee.ArrayList <Gtk.TreeViewColumn> ();
    }

    public static void init_column (Gtk.TreeViewColumn item, TreeViewColumnState state)
    {
      item.clickable = state.clickable;
      item.reorderable = state.reorderable;
      item.resizable = state.resizable;
      item.sort_indicator = state.sort_indicator;
      item.spacing = state.spacing;
      item.visible = state.visible;
      
    }
    
    public Gtk.TreeViewColumn add (string title, string description, bool defaults = true)
    {
      Gtk.TreeViewColumn item = new Gtk.TreeViewColumn();
      items.add(item);
//      item.description = description;
      item.title = title;
      if  (defaults)
      {
//        TreeViewColumnState state;
//        init_column (item,state);
      }
      return item;
    }
  }

} 


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