I resort to your expertly advice because I am sort of "new" to Objective-C, I have read a couple of books and docs (namely Aaron Hillegass & Stephen G. Kochan's books), but some things are still unclear to me, for lack of practise. To put you in context, I have a NSDocument project that uses Core Data for storage.

I struggle with 2 things right now: reading/writing to files, and table views ^^

So my first question is about Core Data : is it only able to save in SQL, XML or Binary format ? Or can I use core data to read/write in any format, according to what I declared in the plist file ? I am trying to work with .po files, and I want to display the translations in a table view containing 2 columns (1 for the msgid and the other for the msgstr).

To read and write files in the po format and display lines in my table view, I most likely need to parse the files using line endings and characters such as "#"as delimiters. I haven't gotten around to doing that yet (I have no idea how to do that yet!), but I would like to know if it is possible or if I need to restart my project that doesn't use Core Data...

Please DO NOT just throw links to the apple documentation at me, it's the most confusing thing ever, and feels like it's made for experts only! I need me some human-readable explanations :)

Thanks a bunch for any help and advice you can give me!

有帮助吗?

解决方案

It is possible to write a different storage format for Core Data, but it is not easy and it sounds like you are not at a level where that is a possibility (no shame there, I'm not either).

If you are only displaying data from the .po files then there is no need to use CoreData. CoreData is meant to provide a file storage solution. You create/edit data and save it using coredata. If you have no intention to create and edit data then get rid of coredata, it will only get in the way.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top