• 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: 'Static' items in an NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'Static' items in an NSOutlineView


  • Subject: Re: 'Static' items in an NSOutlineView
  • From: Koen van der Drift <email@hidden>
  • Date: Tue, 18 Oct 2011 08:20:00 -0400

On Tue, Oct 18, 2011 at 12:19 AM, Quincey Morris
<email@hidden> wrote:
> On Oct 17, 2011, at 19:58 , Koen van der Drift wrote:
>
> What it should look like is:
>
> LIBRARY (static)
> Group1
> Group2
>
>
> FAVORITES (static)
> Group3
> Group4
>
> RECENT (static)
>
> You've missed something basic. In the above example (modeled as you
> previously explained on the source lists in iTunes and Mail), there are
> multiple levels of hierarchy of the data that represents the list content.
> At the root level is the root item, which is represented by a nil NSOutline
> item in your data source methods. It doesn't get displayed, but its children
> do. If you're using a tree controller, this root level doesn't exist.
> At the next level are the content groupings, of which there are 3: Library,
> Favorites and Recent. This is the topmost level when using a tree
> controller.
> At the next level are the children of the content groupings. Group1 and
> Group2 are children of Library; Group3 and Group4 are children of Favorites;
> Recent has no children.
> Below those levels, your groups may have their own children.
> What you're mis-calling "static groups" are actually parent items of the
> real group items. The reason there are no disclosure triangles is that these
> top-level groups are *always* expanded, and have their disclosure triangle
> suppressed via the delegate method I mentioned in an earlier email.


Thanks for the explanation, I now see what I did wrong. As I mentioned
before, when my app starts the first time, I would like to have the
outline view be prepopulated with a few groups: LIBRARY, FAVORITES,
RECENT and maybe Group1 (a child of LIBRARY).  I did all that, but did
not add Group1 to be a child of LIBRARY, so I will do that too. Am I
correct in doing this through an NSFetchRequest, for an entity
@"Group" with a predicate @"Library"?

> Also, regarding sorting of items at the same level, if there is no sort
> descriptor in control, the order of the items is the order in which your
> data source methods associate items with child indexes (if you're using a
> data source) *or* the order of the child item array in each parent (if
> you're using a tree controller).
>

Do you mean that if I create the 'static' items in the order I want
them to be displayed (LIBRARY - FAVORITES - RECENT), that's the order
in which they always will be displayed?

Thanks again,

- Koen.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: 'Static' items in an NSOutlineView
      • From: Quincey Morris <email@hidden>
References: 
 >'Static' items in an NSOutlineView (From: Koen van der Drift <email@hidden>)
 >Re: 'Static' items in an NSOutlineView (From: Quincey Morris <email@hidden>)
 >Re: 'Static' items in an NSOutlineView (From: Koen van der Drift <email@hidden>)
 >Re: 'Static' items in an NSOutlineView (From: Koen van der Drift <email@hidden>)
 >Re: 'Static' items in an NSOutlineView (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Blocks vs. life, the universe and everything
  • Next by Date: Re: Keeping grayscale image grayscale
  • Previous by thread: Re: 'Static' items in an NSOutlineView
  • Next by thread: Re: 'Static' items in an NSOutlineView
  • Index(es):
    • Date
    • Thread