[Mono-devel-list] gtk ComboBox questions...
tberman at off.net
Sun Jul 24 01:51:15 EDT 2005
On Sun, 2005-07-24 at 15:20 +1000, John BouAntoun wrote:
> That brings up a good point.
> Not sure if this is still the case, but why in today's day and age (of C# and other great managed languages) is someone using IterNChildrend() (a strangely named function) to return a property that would be most obviously named Count (as with most other collections)?
I am not sure that makes sense given how TreeModel works.
A TreeIter has no traceable association with its model. At least none
that you can access via public API.
And a TreeModel.Count property makes no sense in a true Tree context, as
you rarely (if ever) care about the # of nodes in the tree, and are
usually more interested in the # of children under a specific node.
Which is exactly what IterNChildren is for.
More information about the Mono-devel-list