Skip navigation.
 
mlRe: *** -[NSCFDictionary setObject:forKey:]: mutating method sent to immutable object
FROM : Hamish Allan
DATE : Tue Feb 19 23:39:23 2008

On Feb 19, 2008 10:18 PM, Daniel Child <<email_removed>> wrote:

> Changing the init method worked. I am still a little puzzled though.
> I later renamed the ivar to localDataCopy (which certainly wouldn't
> be a part of the NSWindow class), and the same error occurred. My
> accessors definitely assume an NSMutableDictionary. Does that mean a
> memory-munching bug????


If you [data setObject:@"test_value" forKey:@"test_key"] just after
you create the NSMutableDictionary, and then NSLog(@"%@", data) just
before the line that gives the error, you should be able to
differentiate between a memory-muncher and an unarchival issue.

Hamish