• 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: Core Data Document-Based App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data Document-Based App


  • Subject: Re: Core Data Document-Based App
  • From: Jon Trainer <email@hidden>
  • Date: Thu, 5 Apr 2007 08:45:24 -0400

Keith,

You could save the open documents' URLs to user preferences upon shutdown of your app. When your app launches, check the user preferences to see if any documents were open, then reopen them by their saved URL.

Look into the following delegate methods on the NSApplication class:
- (void)applicationDidFinishLaunching:(NSNotification *)notification
- (void)applicationWillTerminate:(NSNotification *)notification

Also, look into NSUserDefaults for saving/loading user preferences.


Hope this helps.

Jon Trainer
http://outerlevel.com




On Apr 4, 2007, at 11:14 PM, Keith Penrod wrote:

How do you make it so when you quit your app it remembers what document(s) you had open at the time of quitting and it re-opens those when you re-open the app?

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >Core Data Document-Based App (From: Keith Penrod <email@hidden>)

  • Prev by Date: Re: CoreData multithreading with Bindings question: do Bindings lock?
  • Next by Date: Keyboard Loop with sub-subviews
  • Previous by thread: Core Data Document-Based App
  • Next by thread: Instantiating NSFileHandles
  • Index(es):
    • Date
    • Thread