• 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: best way to save document level settings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: best way to save document level settings?


  • Subject: Re: best way to save document level settings?
  • From: Donald Hall <email@hidden>
  • Date: Tue, 16 Dec 2003 00:36:14 -0700

Uli,

I have implemented NDResourceFork into my program and got it working correctly. However, I did run into one snag. If I open in TextEdit a file for which I have added a resource fork, make a change, and then save the file, the resource fork appears to be lost. ([NDResourceFork resourceForkForReadingAtPath:[self fileName]] returns nil after the file is saved in TextEdit.) This is not something that the user would normally do, and the lost data (sorting column and sorting direction) is not crucial, so it is not a huge problem, but it is an annoyance.

Do you have any idea what happens to the lost resource fork? I did an ls -a in a Terminal window, but there did not appear to be any entry that I could relate to being the resource fork of anything. Presumably it disappears when the file is resaved?

I'm working in Jaguar 10.2.6.

Regards,

Don

At 0:59 Uhr -0500 07.12.2003, Scott Anguish wrote:
it also has issues though with the "other application" that he spoke of. If that app isn't modified (and if you're going to, you might as well modify the format to support it directly) and it writes the file back out.. boom, no gain.

No, not necessarily. If the other application simply changes the file, the resource fork will remain untouched. Of course, if the other application replaces the existing file whenever a change occurs, then the resource fork may disappear.

I guess this appends to what is passed in as the atomically: parameter when the file is saved. Though, depending on how this implemented internally, they may just be swapping the data forks, then it would work.

But I doubt that it would kill the resource fork. If it does, that's a bug, because it would kill any user overrides and custom icons the user assigned to that file through the Finder's info window.
--
Cheers,
M. Uli Kusterer

--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
email@hidden
http://www.appsandmore.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >best way to save document level settings? (From: Donald Hall <email@hidden>)
 >Re: best way to save document level settings? (From: Scott Anguish <email@hidden>)
 >Re: best way to save document level settings? (From: "M. Uli Kusterer" <email@hidden>)
 >Re: best way to save document level settings? (From: Scott Anguish <email@hidden>)
 >Re: best way to save document level settings? (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: Testing NSLineBreakByTruncatingTail
  • Next by Date: A little Advice about Recording informations in XML.
  • Previous by thread: Re: best way to save document level settings?
  • Next by thread: Re: best way to save document level settings?
  • Index(es):
    • Date
    • Thread