• 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: Revert almost working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Binding to selection of NSArrayController
  • Next by Date: Reg : Code Complexity Tools
  • Previous by thread: Re: Binding to selection of NSArrayController
  • Next by thread: Reg : Code Complexity Tools
  • Index(es):
    • Date
    • Thread