Re: What are the official limits of Cocoa when it comes to the length of path names?
Re: What are the official limits of Cocoa when it comes to the length of path names?
- Subject: Re: What are the official limits of Cocoa when it comes to the length of path names?
- From: "Stefan Werner" <email@hidden>
- Date: Fri, 13 Jul 2007 12:27:22 +0200
On Fri, 13 Jul 2007 11:48:17 +0200, Stéphane Sudre <email@hidden>
wrote:
You can drag and drop almost every file from the Finder to the Text
Field and it will display the path name of the file (if it's not a Text
Clipboard file of course).
Yet, if this very same file is in a hierarchy that makes its absolute
path name bigger than 1024 (PATH_MAX in <sys/limits.h>), you can not
drop it anymore.
Is this an engineering specification or a bug (Mac OS X 10.4.10)?
Plain path names are always problematic. You should try and use higher
level abstractions like NSURL/CFURL or FSRef where possible. For drag and
dropping of files, a Text Field is not the best choice, and if only for
the reason that the HIG recommends to avoid showing file paths to the user.
Of course, that all depends on your individual case.
-Stefan
_______________________________________________
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