Re: Rootless, complex NSOutlineView?
Re: Rootless, complex NSOutlineView?
- Subject: Re: Rootless, complex NSOutlineView?
- From: Carl Norum <email@hidden>
- Date: Tue, 27 May 2003 10:47:35 -0600
On Tuesday, May 27, 2003, at 10:11 AM, David Wood wrote:
1. The examples I've seen show NSOutlineView having one root node
displayed, and several child nodes underneath it which may also have
children. Is there any way not to display that one root node? In my
application, that root node is never going to change, and it's enough
that I know it's there. Or is there a way to display an NSOutlineView
with "multiple" roots?
Return the number of "roots" you want from the
outlineView:numberOfChildrenOfItem: method like this:
And just make sure you don't throw nil items around elsewhere.
- (int)outlineView:(NSOutlineView *)outlineView
numberOfChildrenOfItem:(id)item
{
if (item == nil)
return 4;
}
--
Carl J Norum
5th Year Electrical Engineering/Computer Science Student
University of Saskatchewan
Saskatoon, Canada
http://norum.homeunix.net/~carl/
_______________________________________________
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.