• 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: [resolved] Re: really weird move file problem -- bonus points to Jon Hendry
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [resolved] Re: really weird move file problem -- bonus points to Jon Hendry


  • Subject: Re: [resolved] Re: really weird move file problem -- bonus points to Jon Hendry
  • From: Jaime Magiera <email@hidden>
  • Date: Mon, 24 Sep 2007 19:07:14 -0400


On Sep 24, 2007, at 6:10 PM, Alastair Houghton wrote:

A better solution might be to explicitly send -closeFile to the NSFileHandle once you're finished with it... this also has the merit that it will work under garbage collection, no matter how long the collector decides to wait between collections.

Hi,

Actually, I did/do. The method uses update for certain parts, then a closeFile at the end. For some reason, the closeFile takes longer than the method returning to its caller. It seems to be based on the amount of bytes written in a particular cycle. For example, when I would comment out a part of the method which writes several dozen TIFF images to the handle before the closeFile, it copied over fine. However, if I un-comment that section, the error returns. So,it seems I need to call update more often, or add a delay before the copy. I'm curious about two things...

- Why did my method return before [NSFileHandle closeFile] finishes? Would control remain in the call until it returns?

- What is the caching limit of an NSFileHandle? I would think it would be gigabytes. So, why would adding a few TIFF images take such a long time to close/update?

interesting,

Jaime Magiera
Sensory Research Network
http://www.sensoryresearch.net




_______________________________________________

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: [resolved] Re: really weird move file problem -- bonus points to Jon Hendry
      • From: Alastair Houghton <email@hidden>
References: 
 >Re: really weird move file problem (From: Cem Karan <email@hidden>)
 >Re: really weird move file problem (From: Jaime Magiera <email@hidden>)
 >Re: really weird move file problem (From: Jon Hendry <email@hidden>)
 >[resolved] Re: really weird move file problem -- bonus points to Jon Hendry (From: Jaime Magiera <email@hidden>)
 >Re: [resolved] Re: really weird move file problem -- bonus points to Jon Hendry (From: Alastair Houghton <email@hidden>)

  • Prev by Date: How to disable non-roman input in NSTextField
  • Next by Date: NSPersistentDocument Merged Model Problem
  • Previous by thread: Re: [resolved] Re: really weird move file problem -- bonus points to Jon Hendry
  • Next by thread: Re: [resolved] Re: really weird move file problem -- bonus points to Jon Hendry
  • Index(es):
    • Date
    • Thread