• 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: 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


  • Follow-Ups:
    • Re: warning:assignment from distinct Objective-C type
      • From: Kyle Sluder <email@hidden>
References: 
 >warning:assignment from distinct Objective-C type (From: David Blanton <email@hidden>)
 >Re: warning:assignment from distinct Objective-C type (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Extract the names of all the files in some folder
  • Next by Date: Setting a document's icon and default app
  • Previous by thread: Re: warning:assignment from distinct Objective-C type
  • Next by thread: Re: warning:assignment from distinct Objective-C type
  • Index(es):
    • Date
    • Thread