• 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: [Q] Path/Filename NSFormatter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] Path/Filename NSFormatter


  • Subject: Re: [Q] Path/Filename NSFormatter
  • From: Sherm Pendley <email@hidden>
  • Date: Thu, 12 Sep 2002 18:55:03 -0400

On Thursday, September 12, 2002, at 05:43 PM, Mark de Jong wrote:

I'd like to validate text as it's typed into an NSTextField and ensure that no characters are entered that are not allowed in a filename. Obvious ones like ":" and "/" come to mind to check, but there may be others? Also, it would ensure that the character limit on filenames is not exceeded.

Has this been done as an NSFormatter? Or in some other manner?

I don't know of an NSFormatter that does that, but if you decide to roll your own, NSString's -getFileSystemRepresentation:maxLength: method might be useful. The characters you want to look for will vary, according to the filesystem in use at the given path, and this method takes that into account.

sherm--
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >[Q] Path/Filename NSFormatter (From: Mark de Jong <email@hidden>)

  • Prev by Date: [Q] Path/Filename NSFormatter
  • Next by Date: two-level namespaces and the javabridge
  • Previous by thread: [Q] Path/Filename NSFormatter
  • Next by thread: Re: [Q] Path/Filename NSFormatter
  • Index(es):
    • Date
    • Thread