Re: Renaming files?
Re: Renaming files?
- Subject: Re: Renaming files?
- From: Christoffer Lerno <email@hidden>
- Date: Thu, 23 Dec 2004 10:53:48 +0100
On Dec 22, 2004, at 21:04, Clark Cox wrote:
On Wed, 22 Dec 2004 20:10:02 +0100, Christoffer Lerno <email@hidden>
wrote:
I'm (among other things) using the filename as a dictionary key. Since
the filenames are byte-wise different, isEqualToString: fails where a
compare: would succeed, which in turn makes it impossible for me to
retrieve the dictionary value unless I can make sure the dictionary
key
and the key I use actually do satisfy isEqualToString:
OK, now it makes sense. Just normalize the string before you use it as
a key.
Sorry about the example which didn't actually show this X-)
Anyway, [string decomposedStringWithCanonicalMapping] did the trick.
The filesystem returns canonically mapped strings, so all I needed to
do was to make that NSTextField string use the same mapping, so in the
end it became 1 line of code to fix the whole problem. Smooth.
Thanks a lot,
/Christoffer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden