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:33:19 -0400
Oh, and to confirm, binding NSOutlineView's "selectionIndexPaths" to
NSTreeController's "selectionIndexPath" results in nothing being
displayed in the outlineview. My add button still works (as is evident
from logging the function), but the new data never gets displayed. I
can only assume that the app gets stuck in a "treecontroller's
selection comes from outlineview, whose selection comes from
treecontroller" infinite loop.
- Matt Ball
On 4/5/06, Matt Ball <email@hidden> wrote:
> 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