Re: Send msg to object by nameed NSString;
Re: Send msg to object by nameed NSString;
- Subject: Re: Send msg to object by nameed NSString;
- From: Graham Cox <email@hidden>
- Date: Fri, 20 Jun 2014 22:37:36 +1000
On 20 Jun 2014, at 7:13 pm, Daniel DeCovnick <email@hidden> wrote:
> No, because unless you also override -setNilValueForKey: for your classes that do this, you will raise an NSInvalidArgumentException.
That's not the case for object properties, only for scalar properties. It's perfectly fine to pass nil as the value to an object property, and if it's a 'retain' or 'copy' property, it will release the old value.
> Your first thought is I don’t know memory management? That’s really not very charitable of you.
Really? Even though I asked why, included a conditional and hedged with a 'probably'? Your reading of my comment doesn't seem very charitable. In any case I was only responding to the code as you'd written it. Repeating an error from some earlier code is a bit of a strange thing to do.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden