[pygtk] Inconsistent format for "path" in TreeView callbacks

Jason Heeris jason.heeris at gmail.com
Sat May 7 00:59:38 WST 2011


On 6 May 2011 18:53, Neil Muller <drnlmuller+gtk at gmail.com> wrote:
> a) why do you want to convert between the two? In my experience, when
> I start thinking about equating or manipulating paths, it usually
> means I'm actually trying to test something about the underlying model
> and should be converting to a TreeIter instead.

I have a TreeView with rows that show parameters related to a
particular object. When the user clicks the CellRendererToggle, it
sets a flag in that underlying object; when the row is double-clicked,
another dialog pops up with more detail about the object.

The only way I've thought to do this is to keep a dict mapping paths
in the TreeModel to the objects. If there's a better way, I wouldn't
shoot it down :)

(I'd post code, but I don't have it to hand right now. Hopefully that
description isn't too cryptic.)

Otherwise, the rest of your email covers it.

Cheers,
Jason


More information about the pygtk mailing list