Re: warning:assignment from distinct Objective-C type
Re: warning:assignment from distinct Objective-C type
- Subject: Re: warning:assignment from distinct Objective-C type
- From: Andy Lee <email@hidden>
- Date: Wed, 01 Jul 2009 12:48:12 -0400
On Wednesday, July 01, 2009, at 12:26PM, "David Blanton" <email@hidden> wrote:
> m_sources = [volumes stringsByAppendingPaths:[defaultManager
>directoryContentsAtPath:volumes]];
>
> the warning comes at the above line
Look at the Objective-C type for m_sources, and look at the Objective-C type returned by stringsByAppendingPaths:. You are assigning an NSArray to an NSMutableArray variable. The other way around would be okay, because every NSMutableArray is also an NSArray. But an NSArray is not necessarily an NSMutableArray.
--Andy
_______________________________________________
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