Re: Initializing NSError **, again Re: CoreData Migration Problems
Re: Initializing NSError **, again Re: CoreData Migration Problems
- Subject: Re: Initializing NSError **, again Re: CoreData Migration Problems
- From: Quincey Morris <email@hidden>
- Date: Tue, 8 Feb 2011 15:33:12 -0800
On Feb 8, 2011, at 15:07, Fritz Anderson wrote:
> The documentation for AVAudioPlayer's initWithContentsOfURL:error: and initWithData:error: methods, however, call for "the address of a nil-initialized NSError object," whatever that is. I think they mean a nil-initialized pointer to an NSError pointer. There's similar language for AVAudioRecorder.
>
> I can't imagine this is correct. It is against the semantics for NSError** returns everywhere else in Cocoa. What would the method do with the nil, or with a non-nil value, for that matter? I'd always assumed that the only thing that happens to the input value of *error is that it is blindly overwritten.
You're right -- it's very strange, and the language as it stands is nonsensical, regardless of what the API intends to be passed.
_______________________________________________
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