Adding items to an NSOutlineView
Adding items to an NSOutlineView
- Subject: Adding items to an NSOutlineView
- From: Darrin Cardani <email@hidden>
- Date: Tue, 14 Oct 2003 14:12:02 -0500
I have an NSOutlineView in one of my windows, and it works initially.
I create a single item for the list it's displaying, and it displays
the first item correctly and I can turn it down and see it's
children. However, when I add a second item to the list, it doesn't
add the item to the outline view. I've tried just calling this:
[ outlineView setNeedsDisplay:YES];
but it doesn't work. It appears that the NSOutlineView is not sending
its delegate the -numberOfChildren: message. I've tried:
[ outlineView reloadItem:nil reloadChildren:YES ];
but it raises an exception on the passed in item. I was hoping it
would use nil to mean the root object, like it expects the delegate
to use. Next I tried getting the actual object from my list and
calling:
[ outlineView reloadItem:theItem reloadChildren:YES ];
It no longer raises an exception, but also does not show the new
object. So how do I get the view to realize that there's a new
object, and that it needs to display it?
Thanks,
Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<
http://www.buena.com/>
Video, Image and Audio Processing Development
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.