FROM : Grigory Entin
DATE : Thu Nov 22 04:40:15 2007
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
DATE : Thu Nov 22 04:40:15 2007
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
| Related mails | Author | Date |
|---|---|---|
| Grigory Entin | Nov 22, 04:40 | |
| Mike Abdullah | Nov 22, 12:01 | |
| Grigory Entin | Nov 22, 16:18 |






Cocoa mail archive

