• 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: customizing save behavior in doc based apps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: customizing save behavior in doc based apps


  • Subject: Re: customizing save behavior in doc based apps
  • From: Uli Kusterer <email@hidden>
  • Date: Mon, 26 Dec 2005 22:33:21 +0100


Am 26.12.2005 um 22:08 schrieb Jim Correia:
If you really want to save after every set of changes, listen to the notifications designed for that purpose. An override of - updateChangeCount: or listening for NSManagedObjectContextObjectsDidChangeNotification both seem like more appropriate solutions.

In addition to that, you may want to not save on every change. You could do that by setting up one-shot a timer that will trigger a save in 3 seconds, then remove itself. Whenever a new change happens and the timer is still pending (i.e. has been installed but hasn't yet fired) you simply reschedule it to fire, say, 3 seconds from *that* point in time. That way, while the user is busy changing stuff, the timer will silently be pushed back. As soon as the user makes a short pause (i.e. doesn't do anything for three seconds) the changes will be written to disk.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: customizing save behavior in doc based apps
      • From: email@hidden
References: 
 >customizing save behavior in doc based apps (From: Matthew Russell <email@hidden>)
 >Re: customizing save behavior in doc based apps (From: mmalcolm crawford <email@hidden>)
 >Re: customizing save behavior in doc based apps (From: email@hidden)
 >Re: customizing save behavior in doc based apps (From: Jim Correia <email@hidden>)

  • Prev by Date: NSSlider Cell drawing artifacts
  • Next by Date: Agent Applications and launchd
  • Previous by thread: Re: customizing save behavior in doc based apps
  • Next by thread: Re: customizing save behavior in doc based apps
  • Index(es):
    • Date
    • Thread