Re: [Vala] Some basic questions



On Wed, 2008-04-02 at 12:52 +0200, Juerg Billeter wrote:
On Sat, March 22, 2008 20:06, Mikael Hermansson wrote:
1:

If I want a copy of Gtk.TreePath I have to use weak but the problem is
howto free it after use?

That's a bug in the bindings, copy should obviously not return a weak
reference.

Fixed now.

2:

Another problem probadly a binding bug:

weak List selection = tw.get_selection().get_selected_rows();

Because of the weak ref vala will not free the object but howto free it
manually then??

Same here, bug in the bindings.

Fixed now.

3: Also the model parameter should not be unrefed

TreeModel model;
selections=treeviewPlaylist.get_selection().get_selected_rows( out
model);
if (selection)
  return ;

That's a bug in the compiler, the bindings correctly state that it's a out
weak parameter, i.e. it shouldn't be unref'd.

Not fixed yet, it should be possible to work around this issue by
declaring the local model variable as "weak TreeModel model;". Please
open a bug report about the issue.

Jürg




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