• 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: warning:assignment from distinct Objective-C type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: warning:assignment from distinct Objective-C type
  • Next by Date: Re: GC bug in NSFontManager?
  • Previous by thread: Re: warning:assignment from distinct Objective-C type
  • Next by thread: NSLog / Console / Console Messages
  • Index(es):
    • Date
    • Thread