• 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
Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)


  • Subject: Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)
  • From: Gabriel Zachmann <email@hidden>
  • Date: Fri, 30 Oct 2009 21:09:50 +0100

I think I've found an inconsistency in Cocoa's handling of slashes and colons when handling path names.
Or, maybe someone could correct me, please.


I retrieve a numer of files from a Spotlight query and store them in an array.
Then, I print the file paths, and get something like this:


0. file = w: slash/detail_soldiers.jpg
1. file = w: slash/lot2.jpg
2. file = 2005-03-20 11-59-13.NEF
etc.

Fine, so far.

Then, I do

      [imagefiles_ componentsJoinedByString: @"\n"]

and print the result, and I get

joined names = w\n slash/detail_soldiers.jpg\nw\n slash/lot2.jpg \n2005-03-20 11-59-13.NEF\netc.

Which is a bug, IMHO.
(Why should componentsJoinedByString be concerned with path separators in the first place??)


Or am I missing something? Should I be doing something differently?
If so, what would be the correct way to do it?
(I do need to do -componentsJoinedByString of the paths eventually.)

Regards,
Gabriel.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)
      • From: Kyle Sluder <email@hidden>
    • Re: Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Scripting Bridge running method passing an array
  • Next by Date: RE: Cocoa bindings problem
  • Previous by thread: Re: loading images from external disk
  • Next by thread: Re: Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)
  • Index(es):
    • Date
    • Thread