Array sorting problem
Array sorting problem
- Subject: Array sorting problem
- From: Matt Ridley <email@hidden>
- Date: Thu, 10 May 2001 19:16:35 +0100
Hi folks,
I have an NSMutableDictionary called "items". I'm trying to
create an array of its keys (which are just NSStrings), sorted
alphabetically. My code works fine, but produces a warning
during compilation:
assignment from incompatible pointer type
The relevant part of my code is as follows:
NSMutableArray *tempArray;
tempArray = [[items allKeys]
sortedArrayUsingSelector:@selector(compare:)];
The second line is the one highlighted when I click the warning
message in Project Builder. As I said, it works perfectly, but
I'd like to understand the cause of the warning. Can anyone help?
Best,
-Matt
--
Matt Ridley
<
http://www.mattridley.com/>