Re: [Vala] gtk treeview (one column) example



On Thu, 2007-11-08 at 14:43 +0100, pancake wrote:
Here's a one column example for using gtktreeview with Vala.

Maybe the code can be better, but it works, and imho is most ok.

the treeview is one of the most complicated things to manage with gtk, so
a good documentation for it would be good.

The example is attached.

You should be able to use

string foo;
tv.model.get(ref iter, 0, out foo);

to retrieve a string. Your version will lead to a memory leak as the
preallocated GString will be replaced by the string allocated by the
tree model.

What about adding this example after the simplification to the Wiki?

Jürg




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