Re: Error Recovery at close of document window
Re: Error Recovery at close of document window
- Subject: Re: Error Recovery at close of document window
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Thu, 22 Sep 2011 21:20:40 +0700
On 22 Sep 2011, at 21:14, Mike Abdullah wrote:
>
> On 22 Sep 2011, at 14:06, Gerriet M. Denkmann wrote:
>
>> In a document based app, when
>> - (id)fileWrapperOfType:(NSString *)typeName error:(NSError **)outError
>>
>> does not work, I return an NSError with NSRecoveryAttempterErrorKey etc.
>> which gives the user the option to sort out the problem, and finally I call:
>> [self performSelector:@selector(saveDocument:) withObject:self afterDelay:0.0];
>> works fine if the writing was triggered by File→Save, or autosave etc.
>>
>> But fails when it was triggered by closing the window.
>> Obviously the window, and self (the subclass of NSDocument) has already disappeared when the delayed method is executed.
>
> Back up, why does -fileWrapper… fail?
Because NSFileWriteInapplicableStringEncodingError
> Which OS releases are you targeting with this?
Lion, 10.7.1
_______________________________________________
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