• 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: Core Data and Document Packages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data and Document Packages


  • Subject: Re: Core Data and Document Packages
  • From: Seth Willits <email@hidden>
  • Date: Tue, 10 Jul 2007 13:14:26 -0700

On Jul 10, 2007, at 11:40 AM, sergio wrote:

Hi all,

this is my first message to the list, and I hope it can be useful to some of you, particularly to Seth, that raised the initial question...

I have been looking into how making NSPersistenDocument work with package documents. I ran into the very same problems described in this thread, but could finally get to a working implementation. Here it goes (it's ruby, using the rubycocoa bridge, I hope it's ok with anyone; conversion to Objective C is straightforward, change underscores in method names to :s, intertwine arguments, add some memory management...). The very basic idea is overriding the initialization method, do the url trick there, and everything (except the recent documents menu, but this could be easily fixed if you need it) magically works. For me, that's to say... :-)


Two things. First, I think your approach could be simplified by overriding setFileName: and modifying the path to point inside of a package there (not quite sure, but it seems like it would work to me). But second, the UI (such as the proxy icon menu, and recent menu) will show the path inside of the package rather than the package itself which is odd for the user, so keeping the document url as the package itself is a good idea in my book.


It was interesting to see more rubycocoa code :)


-- Seth Willits



_______________________________________________

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


  • Follow-Ups:
    • Re: Core Data and Document Packages
      • From: Tim Perrett <email@hidden>
References: 
 >Re: Core Data and Document Packages (From: sergio <email@hidden>)

  • Prev by Date: Re: Proper way to load child Window/Controller?
  • Next by Date: Re: Core Data + NSOutlineView + Sorting without NSTreeController
  • Previous by thread: Re: Core Data and Document Packages
  • Next by thread: Re: Core Data and Document Packages
  • Index(es):
    • Date
    • Thread