Re: Adding items to an NSOutlineView
Re: Adding items to an NSOutlineView
- Subject: Re: Adding items to an NSOutlineView
- From: Darrin Cardani <email@hidden>
- Date: Tue, 14 Oct 2003 16:23:26 -0500
At 10:34 PM +0200 10/14/03, Thomas Deniau wrote:
On Tue, 14 Oct 2003 14:12:02 -0500, Darrin Cardani wrote:
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,
Use [outlineView reloadData] to reload the root item.
Remember that NSOutlineView inherits from NSTableView.
Ah, that did it!
At 4:43 PM -0400 10/14/03, Scott Anguish wrote:
You should have the root object somewhere, and you could pass that.
From what I can tell, the NSOutlineView doesn't actually have any
knowledge of the root object. When it wants the delegate to do
something with the root object (like report the number of children it
has), it passes nil to the delegate. (That's why I thought passing it
nil for the item to reload would do the trick. But it didn't.) If I
passed the actual root object to -reloadItem:, I suspect it would
just raise a bad param exception, like when I passed it nil. (But I
have to admit, I haven't actually tried that.)
Or am I not understanding what you're saying?
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.