Re: TreeModel selected row number

On Tue, 2005-03-22 at 18:43 +0100, Murray Cumming wrote:
> > currently I think this would have to be done:
> > std::string color = row[menuColums.color] 
> > if (color == "blue") {...}
> >   //if I want to key to somethingelse have to find index of "blue"
> An id column will do the same, I think. I also doubt that the string
> comparison will be a significant performance hit in an app that's
> probably waiting most of the time anyway.

Furthermore, you'd be doing that string comparison in order to get some
ID to actually use with some with something. It's easier to put that
mapping in the list itself. I'm choosing an example that proves my
point, but I can't think of one right now that doesn't.

Murray Cumming
murrayc murrayc com

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