I feel certain people have run into this before, but my Googling didn't turn up 
exactly what I was looking for.

I'd like to create a "mutable read-only" array property. I want clients of the 
class to be able to observe changes to the *contents* of the array (that is, if 
an element is added or removed), in addition to changes of the entire array. 
But I don't want those clients to be able to add or remove anything to/from the 
array themselves; I only want the class on which the property is defined to be 
able to do that.

Is this possible? My first thought is to make a read-only NSArray* property, 
but then it seems that addition or removal of elements to/from that property 
wouldn't get observed; i.e., an NSArray should never change its contents.

What's the right way to do this? Thanks!
-- 
Rick


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to