Verify that dataSet is an NSMutableArray. The exception is getting thrown because it doesn't respond to removeObjectAtIndex.
jdot
2010-07-12 17:53:46
Verify that dataSet is an NSMutableArray. The exception is getting thrown because it doesn't respond to removeObjectAtIndex.
Your NewsFetcher
returns you an immutable array, not a mutable instance. Use the following instead for initialization:
NSArray *results = [[NewsFetcher sharedInstance]
fetchManagedObjectsForEntity:@"News"
withPredicate:predicate
withDescriptor:@"Titolo"];
dataSet = [results mutableCopy];
An expression like A *a = (A*)b;
only casts the pointer to a different type - it doesn't convert/change the actual type of the instance it points to.