Re: [resolved] Re: really weird move file problem -- bonus points to Jon Hendry
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: Alastair Houghton <email@hidden>
- Date: Mon, 24 Sep 2007 23:10:12 +0100
On 24 Sep 2007, at 21:36, Jaime Magiera wrote:
On Sep 21, 2007, at 4:34 PM, Jon Hendry wrote:
Can you add a pause before copying the working file back to user
space?
I added an NSTimer with a long delay to trigger the copy. Problem
gone. Apparently, the problem was that the method to add bytes to
the file was returning to the main method, which does to the copy,
before the NSFileHandle had closed.
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.
Kind regards,
Alastair.
--
http://alastairs-place.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