• 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
Strange Undo action for caching based on transient properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange Undo action for caching based on transient properties


  • Subject: Strange Undo action for caching based on transient properties
  • From: Grigory Entin <email@hidden>
  • Date: Thu, 22 Nov 2007 06:40:15 +0300

Hi,

Probably this question is rather NSUndoManager related and not
specific to the CoreData, but anyway.. I think it's quite natural to
face this problem while working with CoreData/transient properties
used for caching.. Any hints are appreciated. So..

I'm using caching for some calculated properties and store the cached
values in transient properties. All works fine (including Undo) and
I'm pretty happy.

However, there's a problem:

>>
When "caching" takes place it's recorded in undo manager - that's OK.

Unfortunately, if such a caching happens *without* other changes in
the data (e.g. when user just inspects calculated property, which
value has not been cached), as the result, a "strange" (from the user
perspective) Undo action becomes available.

The Undo action results in "emptying" the cache - that's
understandable from the developer perspective - it's not a question
why it's available and what it does.
>>

So, I'd like to get rid of that effect (strange undo action available
for user), however I need to keep the "caching" recorded for Undo and
therefore "undoable" (and etc.).

I'm thinking of "joining" that "caching"-related undo record with a
previous "undo record" (or even "next" one), but I'm a bit lost on how
to accomplish that, or whether there's a better solution.

Any thoughts?

Many thanks in advance,
Grigory
_______________________________________________

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

  • Follow-Ups:
    • Re: Strange Undo action for caching based on transient properties
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: -[NSManagedObjectContext save:] fails but gives no NSError
  • Next by Date: QTMovieLayer and renderInContext:
  • Previous by thread: Re: -[NSManagedObjectContext save:] fails but gives no NSError
  • Next by thread: Re: Strange Undo action for caching based on transient properties
  • Index(es):
    • Date
    • Thread