My NSArrayController is readonly
@property (readonly) NSArrayController *rootObjectsArrayController;
but its content is changed anyway
[[aClass rootObjectsArrayController] setContent:contentArray];
and it works. Why ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Read only for a property definition just means that you can’t set that property – e.g you can’t set a new array controller as the rootObjectsArrayController via generated accessor methods.
There is nothing stopping you modifying the object that is returned from the getter, though. This would be the same if you had a mutable array as a read only property- you could add objects to the array after accessing it via the property.