• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Managing Files with CoreData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Managing Files with CoreData


  • Subject: Re: Managing Files with CoreData
  • From: "Sean McBride" <email@hidden>
  • Date: Sun, 18 Jul 2010 23:34:04 -0400

Gordon Apple (email@hidden) on 2010-07-18 16:20 said:

>Question 2:  In the File class, what should I override to delete the actual
>associated file when a file object is deleted from the database?  (I'm
>currently doing that separately when deleting the managed object.) Does
>NSManagedObject's "dealloc" get called?

Definitely don't use dealloc.

>Question 3:  The main entity has several NSNumbers.  Should I write
>translators for each of these to make life easier?  (Why wasn't this built
>into CoreData in the first place?)

Take a look at mogenerator:
<http://rentzsch.github.com/mogenerator/>

It generates such methods for you.

>Question 4:  Is there any reason why you can't add additional methods (not
>ivars) to Managed object code-files?

No, doing so is quite common.

>Question 5:  I'm currently formulating file URLs in a separate FileManager
>object.  Is there a better way for CoreData to manage file references?  Full
>URLs could be problematic, if later systems change anything.  Maybe partial
>URLs/paths relative to the application's documents folder?

Dunno about iOS, but on Mac I'd suggest either NDAlias or
bookmarkDataWithContentsOfURL:error:.

Sean


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Managing Files with CoreData (From: Gordon Apple <email@hidden>)

  • Prev by Date: Re: Managing Files with CoreData
  • Next by Date: Re: Removing sorting from NSTableView
  • Previous by thread: Re: Managing Files with CoreData
  • Next by thread: Re: Managing Files with CoreData
  • Index(es):
    • Date
    • Thread