• 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: Renaming files?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Renaming files? (From: Christoffer Lerno <email@hidden>)
 >Re: Renaming files? (From: Jeremy Dronfield <email@hidden>)
 >Re: Renaming files? (From: Christoffer Lerno <email@hidden>)
 >Re: Renaming files? (From: Jeremy Dronfield <email@hidden>)
 >Re: Renaming files? (From: Christoffer Lerno <email@hidden>)
 >Re: Renaming files? (From: Clark Cox <email@hidden>)

  • Prev by Date: Re: Finder vs. Quartz performance.
  • Next by Date: Using atos -p to get symbolic name of address?
  • Previous by thread: Re: Renaming files?
  • Next by thread: Re: Renaming files?
  • Index(es):
    • Date
    • Thread