Re: CoreData headaches

2016-10-30 Thread Samuel Williams
> CoreData [is] just a pile of confusion with no human explanation[.] I know this doesn't help anyone but I couldn't help but agreeing with this statement. On 31 October 2016 at 16:22, Steve Mills wrote: > On Oct 30, 2016, at 14:11:01, Chris Hanson wrote: >> >> On Oct 27, 2016, at 9:02 PM, Stev

Re: CoreData headaches

2016-10-30 Thread Steve Mills
On Oct 30, 2016, at 14:11:01, Chris Hanson wrote: > > On Oct 27, 2016, at 9:02 PM, Steve Mills wrote: >> >> Yes, the Asset is an NSManagedObject. In this call chain, there is no >> NSManagedObjectContext in sight. > > There is always an NSManagedObjectContext involved; an NSManagedObject > d

Re: CoreData headaches

2016-10-30 Thread Chris Hanson
On Oct 28, 2016, at 9:44 PM, Steve Mills wrote: > > On Oct 27, 2016, at 23:35:39, Dave Fernandes wrote: >> >> The managed objects exist in a MOC whether you have a reference to that MOC >> or not. You can get a reference to the MOC that an MO “belongs to" from the >> -[NSManagedObject managed

Re: CoreData headaches

2016-10-30 Thread Chris Hanson
On Oct 27, 2016, at 9:02 PM, Steve Mills wrote: > > Yes, the Asset is an NSManagedObject. In this call chain, there is no > NSManagedObjectContext in sight. There is always an NSManagedObjectContext involved; an NSManagedObject doesn’t exist outside one. Fortunately, you don’t need to pass one

Re: CoreData headaches

2016-10-28 Thread Steve Mills
On Oct 27, 2016, at 23:35:39, Dave Fernandes wrote: > > The managed objects exist in a MOC whether you have a reference to that MOC > or not. You can get a reference to the MOC that an MO “belongs to" from the > -[NSManagedObject managedObjectContext] instance method. Since the properties > yo

Re: CoreData headaches

2016-10-28 Thread Quincey Morris
On Oct 28, 2016, at 13:20 , Steve Mills wrote: > > the CoreData docs are just a pile of confusion with no human explanation that > I can understand That statement seems to have been garbled in transmission. Let me fix it for you: > CoreData [is] just a pile of confusion with no human explanat

Re: CoreData headaches

2016-10-28 Thread Jens Alfke
> On Oct 28, 2016, at 1:20 PM, Steve Mills wrote: > > No, I'm sure I *would* do something like that. :) To me, the CoreData docs > are just a pile of confusion with no human explanation that I can understand. Well, the general rule in a nutshell is that you should only use a CoreData object o

Re: CoreData headaches

2016-10-28 Thread Steve Mills
On Oct 28, 2016, at 01:37 PM, Jens Alfke wrote: On Oct 27, 2016, at 8:49 PM, Dave Fernandes wrote: But what managed object are you dealing with? Is the Asset a managed object? If so, you can only access its properties from the queue of its managed object context. So if it is a main queue con

Re: CoreData headaches

2016-10-28 Thread Jens Alfke
> On Oct 27, 2016, at 8:49 PM, Dave Fernandes > wrote: > > But what managed object are you dealing with? Is the Asset a managed object? > If so, you can only access its properties from the queue of its managed > object context. So if it is a main queue context, you can only access the > MO’s

Re: CoreData headaches

2016-10-27 Thread Dave Fernandes
The managed objects exist in a MOC whether you have a reference to that MOC or not. You can get a reference to the MOC that an MO “belongs to" from the -[NSManagedObject managedObjectContext] instance method. Since the properties you need are so few and simple, why don’t you just pass these in t

Re: CoreData headaches

2016-10-27 Thread Steve Mills
On Oct 27, 2016, at 22:49:15, Dave Fernandes wrote: > > But what managed object are you dealing with? Is the Asset a managed object? > If so, you can only access its properties from the queue of its managed > object context. So if it is a main queue context, you can only access the > MO’s prop

Re: CoreData headaches

2016-10-27 Thread Dave Fernandes
But what managed object are you dealing with? Is the Asset a managed object? If so, you can only access its properties from the queue of its managed object context. So if it is a main queue context, you can only access the MO’s properties from the main queue. If it is a private queue context, yo

Re: CoreData headaches

2016-10-27 Thread Steve Mills
On Oct 27, 2016, at 19:00:14, Dave Fernandes wrote: > > Are you accessing the properties from within a > NSManagedObjectContext.performBlock block? Sounds like you may be accessing > the managed objects from the wrong queue. I'll explain what's going on. Each NSCollectionViewItem in the NSColl

Re: CoreData headaches

2016-10-27 Thread Dave Fernandes
> On Oct 27, 2016, at 5:24 PM, Steve Mills wrote: > > I have an app that uses CoreData to store document data, and an > IKImageBrowserView to display the items in the CoreData. Finding that > IKImageBrowserView is being deprecated, and since Xcode 8 causes a goofy > scrolling bug that the use

CoreData headaches

2016-10-27 Thread Steve Mills
I have an app that uses CoreData to store document data, and an IKImageBrowserView to display the items in the CoreData. Finding that IKImageBrowserView is being deprecated, and since Xcode 8 causes a goofy scrolling bug that the user can't work around, I decided to move away from IKImageBrowse