• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: willPresentError being called with NSDocumentErrorRecoveryAttempter object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: willPresentError being called with NSDocumentErrorRecoveryAttempter object


  • Subject: Re: willPresentError being called with NSDocumentErrorRecoveryAttempter object
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 16 Jan 2012 18:37:07 -0800

On Jan 16, 2012, at 18:22 , Gideon King wrote:

> Further information: when the user selects to duplicate, - (BOOL)readFromURL:ofType:error: is called with the error argument being an NSDocumentErrorRecoveryAttempter object.
>
> I don't know why this is happening.
>
> Would it be save for me to do something like this:
>
>    if (*outError && [*outError isKindOfClass:NSClassFromString(@"NSDocumentErrorRecoveryAttempter")]) {
>        *outError = nil;
>    }
>
> ?
>
> From a practical perspective, it seems to work, but I just don't get why I'm getting the NSDocumentErrorRecoveryAttempter object passed in to my file reading method.

You're not. 'outError' is an output-only parameter. The value of '*outError' on entry to the method is trash.

The rule is that if your implementation of 'readFromURL:ofType:error:' is going to return NO, and the 'outError' pointer is not NULL, you *must* create a new NSError object and assign it '*outError'.


_______________________________________________

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

  • Follow-Ups:
    • Re: willPresentError being called with NSDocumentErrorRecoveryAttempter object
      • From: Gideon King <email@hidden>
References: 
 >willPresentError being called with NSDocumentErrorRecoveryAttempter object (From: Gideon King <email@hidden>)
 >Re: willPresentError being called with NSDocumentErrorRecoveryAttempter object (From: Gideon King <email@hidden>)

  • Prev by Date: Re: willPresentError being called with NSDocumentErrorRecoveryAttempter object
  • Next by Date: Re: willPresentError being called with NSDocumentErrorRecoveryAttempter object
  • Previous by thread: Re: willPresentError being called with NSDocumentErrorRecoveryAttempter object
  • Next by thread: Re: willPresentError being called with NSDocumentErrorRecoveryAttempter object
  • Index(es):
    • Date
    • Thread