Re: Inconsistency in handling of slashes and colons (bug in componentsJoinedByString ?)
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