• 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: NSSavePanel does replace / in the filename with a :
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSavePanel does replace / in the filename with a :


  • Subject: Re: NSSavePanel does replace / in the filename with a :
  • From: Ken Thomases <email@hidden>
  • Date: Sat, 16 Oct 2010 11:43:56 -0500

On Oct 16, 2010, at 10:34 AM, Thorsten Lemke wrote:

> The problem is:
> I enter as name i.e.: Part 1/2.jpg into the save panel.
> I click on ok.
> I get as filename in the code: "Part 1:2.jpg".
>
> So, how can I avoid this?

You don't avoid it.  You don't want to.

The *user-visible* file name is "Part 1/2.jpg".

The correct *internal representation* of that file name is "Part 1:2.jpg".

There's no reason for the internal representation to be the same as the user-visible name.  You shouldn't care what the internal representation is.  And the user should never see it.  When you need to present a file name to the user, you use the methods I mentioned previously to obtain the appropriate user-visible display name.  But other than that, you should be working with the internal representation.

Regards,
Ken

_______________________________________________

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: NSSavePanel does replace / in the filename with a :
      • From: Thorsten Lemke <email@hidden>
References: 
 >Re: NSSavePanel does replace / in the filename with a : (From: Thorsten Lemke <email@hidden>)

  • Prev by Date: Re: Loading a Nib file
  • Next by Date: Re: NSSavePanel does replace / in the filename with a :
  • Previous by thread: Re: NSSavePanel does replace / in the filename with a :
  • Next by thread: Re: NSSavePanel does replace / in the filename with a :
  • Index(es):
    • Date
    • Thread