Re: NSSavePanel does replace / in the filename with a :
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