From: Markus R. <rol...@un...> - 2007-06-11 10:10:55
|
Hi, On Sun, 10 Jun 2007, Joschka Boedecker wrote: [...] > This is not the only place where FindChildSupportingClass is used, and > in other cases, it seems to work (as does ListChildrenSupportingClass > which basically works the same way). Maybe it has something to do with > the recursion, but from looking at the code in lib/zeitgeist/leaf.h, I > couldn't find anything suggesting that. Markus, in case you read that, > do you have any idea why this could happen? yes, I think the problem is that in the recursive case the result of FindChildSupportingClass(...) for the first found child is immediately returned. So if the first child does not have a matching node the function returns immediately false instead of testing further children. The fix should be to add a second inner loop that checks all children of the current node and then returns for the first found node. Cheers, Markus |