• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Rootless, complex NSOutlineView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Rootless, complex NSOutlineView? (From: David Wood <email@hidden>)

  • Prev by Date: Re: Rootless, complex NSOutlineView?
  • Next by Date: Re: Rootless, complex NSOutlineView?
  • Previous by thread: Re: Rootless, complex NSOutlineView?
  • Next by thread: Re: Rootless, complex NSOutlineView?
  • Index(es):
    • Date
    • Thread