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

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


  • Subject: Re: Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 30 Oct 2009 14:03:44 -0700


On Oct 30, 2009, at 1:09 PM, Gabriel Zachmann wrote:

0. file = w: slash/detail_soldiers.jpg
1. file = w: slash/lot2.jpg
2. file = 2005-03-20 11-59-13.NEF
etc.
[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.

That's pretty weird. I've used componentsJoinedByString quite a lot for years, and never seen it do anything strange like that: it always simply concatenates the strings in the array inserting the separator string between them.


Are you certain about the contents of the array imagefiles_? Are you sure the objects in the array are NSStrings? Try setting a breakpoint at the componentsJoinedByString: call and doing things like
po [imagefiles_ objectAtIndex: 0]
po [(id)[imagefiles_ objectAtIndex: 0] class]


—Jens

_______________________________________________

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


References: 
 >Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?) (From: Gabriel Zachmann <email@hidden>)

  • Prev by Date: Re: What's the friendliest way to restart the Dock?
  • Next by Date: Re: Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)
  • Previous by thread: Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)
  • Next by thread: Re: Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)
  • Index(es):
    • Date
    • Thread