2010/1/26 Doriano Blengino <doriano.bleng...@fastwebnet.it>: > Actually I expressed myself badly. Example:
Actually, I express myself badly quite often. Example: [CENSORED] [CENSORED] [CENSORED] [CENSORED]! :) As for this: [QUOTE] Tree1: - item0 - item1 - item1.0 Tree1.count is 3 (global count) [QUOTE] Unless you expressed yourself badly again I disagree. :) The count is one. One root. One tree. tv["Tree1"].Count < -- count of immediate descendants (child nodes) below Tree1, which is 2. One for each child, item0 and item1. Your count includes children and grandchildren. Each node, should only ever report its direct 1st level ascendants, not any subsequent generation nodes. therefore, from your example: tv["Tree1"].Count = 2 tv["Item0"].Count = 0 tv["Tree1"].Count = 1 and... tv.Count = 1 <-- Tree1, the one and only root node. The point is, the count changes based on what node you are looking at. The count should always, ever, without fail, report only the count of its children, never later descendants. So, given this tree: ZZZZ AAAA - BBBB - CCCC - DDDD - EEEE - FFFFF The count at root is 2, AAAA and ZZZZ. The count at ZZZZ is 0, no children. The count at AAAA is 3, with BBBB, CCCC, and DDDD being children. The count at BBBB and CCCC is 0. The count at DDDD is 1. The count at EEEE is 1, with FFFF being the only child. The count at FFFF is? Zero. ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user