• 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: UndoManager doesn't work with saved documents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UndoManager doesn't work with saved documents


  • Subject: Re: UndoManager doesn't work with saved documents
  • From: Bill Cheeseman <email@hidden>
  • Date: Tue, 13 May 2003 16:20:47 -0400

on 03-05-13 9:57 AM, Rob In der Maur at email@hidden wrote:

> Thanks, but I sorted it out; I forgot to associate my data model after
> loading it with the file content with the document itself, using:
>
> // init the model after we unarchived
> [[self chartData] initAfterUnarchivingWithDocument:self];
>
>
> The initAfterUnarchivingWithDocument method in my model class actually
> is very simple and looks like
>
> - (void)initAfterUnarchivingWithDocument:(ChartDocument
> *)inDocument
> {
> document = inDocument;
> }
>
>
> That did the trick. Got it from Cheeseman's excellent book 'Cocoa
> Recipes'....

I recognized my code before I got to the last line of your message. Thanks.

To be clear about it: You don't have to do this post-unarchiving
initialization in a separate method. I did it that way in the book for
clarity. When it's as simple as this, there's no reason you can't do it in
the main unarchiving method, after the unarchiving is finished.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: UndoManager doesn't work with saved documents (From: Rob In der Maur <email@hidden>)

  • Prev by Date: Re: NSOpenPanel issue
  • Next by Date: Re: Project Builder ate my code
  • Previous by thread: Re: UndoManager doesn't work with saved documents
  • Next by thread: Getting Image from RTFD Data?
  • Index(es):
    • Date
    • Thread