From b4e517b4d3f29ebf7612ac3c75d578bd496c627b Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 11 Jun 2008 13:55:44 -0400 Subject: [PATCH] Index path by appending 0 to the IP --- Source/DebuggerWindowController.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/DebuggerWindowController.m b/Source/DebuggerWindowController.m index a45b604..1418738 100644 --- a/Source/DebuggerWindowController.m +++ b/Source/DebuggerWindowController.m @@ -269,10 +269,16 @@ */ - (void)addChildren:(NSArray *)children toNode:(NSTreeNode *)node { - NSXMLElement *parent = [node representedObject]; + [[node mutableChildNodes] removeAllObjects]; + NSIndexPath *ip = [node indexPath]; + int i; + for (NSXMLNode *child in children) { - [parent addChild:child]; + NSTreeNode *newChild = [[NSTreeNode alloc] initWithRepresentedObject:child]; + [registerController insertObject:child atArrangedObjectIndexPath:[ip indexPathByAddingIndex:0]]; + i++; + [newChild release]; } [registerController rearrangeObjects]; -- 2.43.5