Re: NSArray vs. NSMutableArray ... "distinct objective-c type"
Re: NSArray vs. NSMutableArray ... "distinct objective-c type"
- Subject: Re: NSArray vs. NSMutableArray ... "distinct objective-c type"
- From: Ken Thomases <email@hidden>
- Date: Sat, 6 Jun 2009 07:36:33 -0500
On Jun 6, 2009, at 7:14 AM, Martin Batholdy wrote:
I have created a method that do something with an NSArray.
Now when I use the method and give it an NSMutableArray instead of
an NSArray,
I get a warning;
"passing argument x of "method" from distinct objective-c type"
Now, the result is ok. Everything is working how it is intended.
So, should I just ignore the message?
Or is that bad practice ...?
It's bad practice to ignore the message. However, you must have
misunderstood something about the situation because you would not
receive that message in the situation you describe. The only way to
solve this misunderstanding is for you to show your code. Show the
declaration of the method you've created; show the code which includes
the call of that method (which should, according to what you've said,
include the line which is generating the compiler warning); show the
declaration of the variables you're using.
Regards,
Ken
_______________________________________________
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