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



On Thu, Nov 08, 2007 at 06:36:08PM +0100, J?rg Billeter wrote:
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.

this kind of things should be detected by the compiler or at least
documented anywhere and do not relay on the final user to make this
things well, because they're a bit confusing (and there's no doc ?)

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

It's ok for me :)

Feel free to do it, i'm at work now, and i'll go back to home later,
so don't wait for me :)

--pancake



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