• 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: What are the official limits of Cocoa when it comes to the length of path names?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Stéphane Sudre <email@hidden>
  • Date: Fri, 13 Jul 2007 12:36:29 +0200


On Jul 13, 2007, at 12:27 PM, Stefan Werner wrote:

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.

I agree with you. The problem here is that I didn't write any line of code (this project is code free) to make this happen. The limitation is in the Cocoa framework.


Of course, that all depends on your individual case.

Actually, I'm tracking an issue with Alias resolution and I'm testing different cases to see where the problem might come from. My biggest surprise so far is that the same limit affects CFURLGetFSRef.



_______________________________________________

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: What are the official limits of Cocoa when it comes to the length of path names?
      • From: Alastair Houghton <email@hidden>
References: 
 >What are the official limits of Cocoa when it comes to the length of path names? (From: Stéphane Sudre <email@hidden>)
 >Re: What are the official limits of Cocoa when it comes to the length of path names? (From: "Stefan Werner" <email@hidden>)

  • Prev by Date: Re: What are the official limits of Cocoa when it comes to the length of path names?
  • Next by Date: Re: NSSlider and doube-click event
  • Previous by thread: Re: What are the official limits of Cocoa when it comes to the length of path names?
  • Next by thread: Re: What are the official limits of Cocoa when it comes to the length of path names?
  • Index(es):
    • Date
    • Thread