On Jun 6, 2009, at 3:18 PM, Ammar Ibrahim wrote:

The problem is that in my delegate I can't access the file! Although I can see it on the filesystem and open it. even if I check if the file exists from the delegate, it gives me "false". Why is this happening? How can I fix
it


Well, let's see...

task = [[NSTask init] alloc];

For starters, you wrote this backwards.

I also don't see any place where you're registering for any notifications, nor are you releasing the task object (which is fine if you're using GC).

But the best thing you can do is not use NSTask if you can do the job without NSTask. In this case, you ought to consider using NSURLDownload instead of NSTask, unless the URL is a TFTP URL or some other URL scheme that is not handled by NSURLConnection/NSURLDownload.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to