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

Re: [Vala] internal error: duplicating string[] instances not yet supported



On Sat, 2008-05-31 at 21:19 +0200, gege2061 wrote:
> Thank, but I do not see where I have ownership transfer:
> 
>  public void add ()
>  {
>    string[] fields = new string[this.nb_colonne];
> 
>    if (this.show (ref fields))
>    {
>      Gtk.TreeIter iter;
>      Gtk.ListStore list_store = (Gtk.ListStore)this.tree_view.get_model ();
>      list_store.append (out iter);
>      for (int i = 0; i < this.nb_colonne; i++)
>      {
>        list_store.set (iter, i, fields[i]);
>      }
>      this.update_file ();
>    }
>  }

The issue was the `ref' argument, however, that was a bug in the
semantic analyzer, it's fixed now.

BTW: From what I see you probably shouldn't use a `ref' parameter in the
show method. It will work but shouldn't be necessary.

Jürg



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