Re: CoreData 3 questions
Re: CoreData 3 questions
- Subject: Re: CoreData 3 questions
- From: Fritz Anderson <email@hidden>
- Date: Sun, 8 May 2005 15:56:59 -0500
On 8 May 2005, at 3:21 PM, Todd Blanchard wrote:
Item 1 - Creating a new document based coredata project - XCode
generates a MyDocument class, and model etc. Not so descriptive,
but it seems like a lot of work to find all the occurrences of
"MyDocument" and rename them. Do people generally bother to rename
this or just leave it? Seems like a lot of trouble.
I admit being lazy enough usually to leave MyDocument as MyDocument.
However, if I wanted to change the name, I'd have a computer to do
the work for me. Project Find (cmd-shift-F) MyDocument / tab /
DocumentClassName -- In Project -- Whole Words -- Replace will do all
the text work, and then you just change the owner class in IB. Option-
click on the .m and .h files in the Groups & Files list to rename them.
Item 2 - Spotlight searchability - does Spotlight know how to
search the slqlite archives out of the box or do I need to provide
a plugin?
Short answer: You need to provide a plugin. However, building a whole
Core Data stack just to pull metadata is way too heavyweight, so
there's a provision in NSPersistentStoreCoordinator that allows you
to attach canned metadata to your data file from your application.
The plugin can read the metadata dictionary, and relay it to
Spotlight, without opening the file.
So the plugin is trivial. You have to make modifications to your
document subclass, but those are cookbooked in the
NSPersistentDocument tutorial in the ADC Reference Library. Full-text
search the Xcode documentation for metadataForPersistentStoreWithURL:.
-- F
--
Fritz Anderson
Consulting Programmer
http://resume.manoverboard.org/
_______________________________________________
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