I have the following statement in my program:
[operateAns replaceCharactersInRange:NSMakeRange(start, end-start) withString:[answer stringValue]];
operateAns is initialized in the following way where calc is an NSMutableString:
operateAns = calc;
and I am getting the following error
'NSInvalidArgumentException', reason: 'Attempt to mutate immutable object with replaceCharactersInRange:withString:'
any ideas as to why this is happening?