Re: Ordered CoreData won't preserve selection
Re: Ordered CoreData won't preserve selection
- Subject: Re: Ordered CoreData won't preserve selection
- From: "Matt Ball" <email@hidden>
- Date: Wed, 5 Apr 2006 15:27:26 -0400
Yes, I wrote that email late at night, so I didn't articulate my
situation correctly. I have checked 'preserve selection' on my
NSTreeController, but every time the outlineview gains focus again
(either by bringing the window back to front or by clicking on it. any
time, i assume, -rearrangeObjects is called), the selection resets to
the top one.
- Matt Ball
On 4/4/06, Joshua Scott Emmons <email@hidden> wrote:
> > Does anyone know: 1) Why CoreData is not preserving my selection,
> > despite "preserve selection" being checked in IB?
>
> I'll admit I don't grok most of your example above, but I do know
> this much: Core Data has nothing to do with your selection. The
> NSTreeController holds on to the selection for you. The way
> NSOutlineView knows what to select is by binding NSOutlineView to
> NSTreeController's selectionIndexPaths property. The way
> NSOutlineView knows what objects have what indexes is by binding to
> NSTreeController's arrangedObjects property.
>
> If you haven't set a sort descriptor for NSTreeController that sorts
> on the basis of the index you added to your entity, your index
> numbers and what NSOutlineView thinks are an object's index (based on
> its order in arrangedObjects) might not line up?
>
> Just a thought. Anyway, I think you should be looking at the
> controller, not the Core Data.
>
>
> Cheers,
> -Joshua Emmons
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden