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: Mac First <email@hidden>
- Date: Thu, 2 Jul 2009 07:06:11 -0700
On Jul 1, 2009, at 9:34 AM, Ken Thomases wrote:
On Jul 1, 2009, at 11:26 AM, David Blanton wrote:
in .h file
NSMutableArray *m_sources;
[...]
m_sources = [volumes stringsByAppendingPaths:[defaultManager
directoryContentsAtPath:volumes]];
-stringsByAppendingPaths: returns an NSArray*. That is not an
NSMutableArray*. (NSMutableArray is-a NSArray, though, of course.)
Note that, if you want a mutable array, you can wrapper the return-
result in [NSMutableArray arrayWithArray: ... ]
_______________________________________________
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