From 16fe2e901ea17a47eb67a1ba0c2b9beeb53abb63 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 11 Jun 2008 15:33:40 -0400 Subject: [PATCH] Trying to use mutableChildNodes and appending mock-NSTreeNode objects --- Source/DebuggerWindowController.m | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/DebuggerWindowController.m b/Source/DebuggerWindowController.m index ab0d6ca..ce1dcac 100644 --- a/Source/DebuggerWindowController.m +++ b/Source/DebuggerWindowController.m @@ -269,15 +269,13 @@ */ - (void)addChildren:(NSArray *)children toNode:(NSTreeNode *)node { - [[node mutableChildNodes] removeAllObjects]; - NSIndexPath *ip = [node indexPath]; - int i; + NSMutableArray *childNodes = [node mutableChildNodes]; + [childNodes removeAllObjects]; for (NSXMLNode *child in children) { NSTreeNode *newChild = [[NSTreeNode alloc] initWithRepresentedObject:child]; - [registerController insertObject:child atArrangedObjectIndexPath:[ip indexPathByAddingIndex:i]]; - i++; + [childNodes addObject:newChild]; [newChild release]; } -- 2.43.5