• 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: nsbundle and nspersistentdocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nsbundle and nspersistentdocument


  • Subject: Re: nsbundle and nspersistentdocument
  • From: mmalcolm crawford <email@hidden>
  • Date: Thu, 26 May 2005 01:08:08 -0700


On May 26, 2005, at 12:30 AM, Cornelius Jaeger wrote:
thx for the info, gonna use a data entity to keep my data and load it lazily.
is there any way i can have a data entity and refer to it by path, rather than load the nsdata into memory.


You can have an entity that has a data attribute that you load lazily.

if i load an image using initWIthContentsOfURL: i have the data in memory once, till i release, correct?

Correct.

if i reference a data entity i load the data into memory and then init my image with initWithData: i have the data in memory twice?

I believe so -- I *think* NSImage will make a copy of the data, however it's late and I may be wrong. Please would someone correct me if I am...

do you know how to do this using the core data framework. i was hoping to keep an assets folder in my filewrapper to copy any images to.

You can easily enough add an accessor method for an image that loads the image on demand based on a (relative) path that's stores as a persistent property. What I'm not sure about yet is whether there's a way to easily use file wrappers with Core Data -- you certainly can't (ironically) with a subclass of NSPersistentDocument, you *may* be able to if you subclass NSDocument...

mmalc

_______________________________________________
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


References: 
 >nsbundle and nspersistentdocument (From: Cornelius Jaeger <email@hidden>)
 >Re: nsbundle and nspersistentdocument (From: mmalcolm crawford <email@hidden>)
 >Re: nsbundle and nspersistentdocument (From: Cornelius Jaeger <email@hidden>)

  • Prev by Date: NSImageView and custom cells....
  • Next by Date: Re: NSNumber is completely broken
  • Previous by thread: Re: nsbundle and nspersistentdocument
  • Next by thread: Moving Controls animation
  • Index(es):
    • Date
    • Thread