On Tue, Oct 18, 2011 at 12:19 AM, Quincey Morris
<quinceymor...@rivergatesoftware.com> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to