> On Nov 7, 2016, at 2:33 PM, Quincey Morris
> wrote:
>
> On Nov 7, 2016, at 10:46 , Richard Charles wrote:
>>
>> This is exactly the same as before but it now works!
>
> Regarding that particular mystery, NSChangeUndone decrements
> On Nov 7, 2016, at 12:24 PM, Jens Alfke wrote:
>
>> On Nov 7, 2016, at 10:46 AM, Richard Charles wrote:
>>
>>[doc performSelector:@selector(updateChangeCount:)
>> withObject:@(NSChangeUndone)
>> afterDelay:0];
>
>
On Nov 7, 2016, at 10:46 , Richard Charles wrote:
>
> This is exactly the same as before but it now works!
Regarding that particular mystery, NSChangeUndone decrements the change count.
If it happened to be 1 when you tried this, the document would stop being
dirty.
Why not just call [doc revertToContentsOfURL:[doc url] ofType:[doc fileType]
error:], which is what the docs for -revertDocumentToSaved: say it does
after the user confirmation?
—Jens
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do
> On 7 Nov 2016, at 18:46, Richard Charles wrote:
>
> NSChangeUndone
try NSChangeCleared
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact
> On Nov 7, 2016, at 10:46 AM, Richard Charles wrote:
>
>[doc performSelector:@selector(updateChangeCount:)
> withObject:@(NSChangeUndone)
> afterDelay:0];
That one definitely won’t work. The parameter to updateChangeCount: is an
integer
I have a dirty document that needs to be cleared programmatically. So I try the
following but it does not work. I have verified that updateChangeCount: is
being called but the document change count state is not being changed. This
code is executed on the main thread.
// Called from a