Re: Revert almost working
Re: Revert almost working
- Subject: Re: Revert almost working
- From: Marek Hrušovský <email@hidden>
- Date: Wed, 03 Dec 2014 11:32:09 +0100
Reverting means that new model is loaded into ORIGINAL window
(windowDidLoad / awakeFromNib aren't going to be called because the window
already exists). Make sure you hook your delegates in
readFromData:ofType:error: or revertToContentsOfURL:ofType:error:
Mind that your IBOutlets might not exists in readFromData:ofType:error:
(launching app, opening a document)
I was playing with it last week.
https://github.com/xhruso00/shapeart/
On Wed, Dec 3, 2014 at 3:34 AM, Graham Cox <email@hidden> wrote:
>
> > On 3 Dec 2014, at 1:09 pm, Kevin Bracey <email@hidden> wrote:
> >
> > When I go into Revert then are versions waiting to revert, when I choose
> one it appears to Revert, but the currently opened Document stays the same.
>
>
> Assuming that your overridden -readFromFileWrapper: (or one of its
> subordinate methods) is invoked when reverting, are you sure you're
> actually doing something that refreshes the view that displays the document
> content? You have to arrange this, either because you replaced or updated
> your data model during file open/revert and that has the side-effect of
> marking the relevant views as dirty, or because whatever you did, something
> marked the view as dirty.
>
> --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
>
_______________________________________________
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