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 
IKImageBrowserView and reimplement the display as an NSCollectionView. OK, that 
works. In order to match the speed at which IKImageBrowserView builds 
thumbnails in the background, I used an NSOperationQueue in which to load each 
thumbnail via CGImageSourceCreateThumbnailAtIndex. This mostly works fine, 
except I get random crashes when accessing properties of a NSManagedObject (the 
image file's folder's url and image file's name). Any suggestions for making 
this work correctly? I'm just hacking at it right now by adding @synchronize() 
wrappers around code, but it's not helping.

Since CoreData and managed objects are full of so much voodoo (and because it's 
been a long time since I originally wrote this app, so the CoreData stuff is 
pretty fuzzy by now), I wonder if there isn't a better system I could use to 
store document data. The app is an image organizer that can store references to 
thousands of images and movies (not the actual images), sort and filter them 
any number of ways (which is all handled by an NSArrayController), and tag them 
with keywords (also NSManagedObject).

What does CoreData give me that I can't get by simply archiving an array of 
NSDictionary? Well, aside from undo, writing only changed objects to the file, 
and all the rest of the stuff it does.

The previous version of the app used my own file format. I don't recall it 
being particularly slow or featureless. Hmm.

--
Steve Mills
Drummer, Mac geek


_______________________________________________

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

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

Reply via email to