Re: Beachball on Lengthy Task
Re: Beachball on Lengthy Task
- Subject: Re: Beachball on Lengthy Task
- From: Pierce Freeman <email@hidden>
- Date: Sun, 05 Apr 2009 20:25:06 -0700
- Thread-topic: Beachball on Lengthy Task
David:
Thanks for all your help, it's almost working... Just one more question:
Question: I am attempting to "turn" the object returned into a NSDictionary,
but it doesn't seem like something that can be turned into a NSDictionary.
Am I doing something wrong here? The file is a plist file.
Sincerely,
Pierce Freeman
On 4/5/09 6:36 PM, "Dave Keck" <email@hidden> wrote:
>> 1. Is there any concern of thread safety using this class?
>> 2. How can I pass NSFileHandle the file URL of my files?
>> 3. How could I create a method that will take the contents of the file and
>> do something with them?
>
> 1. No. NSFIleHandle takes care of creating a separate thread for you,
> and notifies your main thread when it's finished reading the given
> file, with a NSFileHandleReadToEndOfFileCompletionNotification
> notification.
>
> 2. If you have a NSURL and need to create a NSFileHandle with that,
> simply use NSURL's -path method to get the NSURL's filesystem path.
> Otherwise, just create your file handle with a NSString path using
> -fileHandleForReadingAtPath:.
>
> 3. Register for the NSFileHandleReadToEndOfFileCompletionNotification
> notification. Once it's received, you can access its respective
> NSFileHandle using the notification's -object method.
>
> All of this has happened before, and it will all happen again, as they
> say. The answers to 2 & 3 can be found with a little searching - I
> encourage you to do so.
>
> David
_______________________________________________
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