FROM : Mike Abdullah
DATE : Thu Nov 22 12:01:55 2007
You can "join" it with the previous undo like so:
NSManagedObjectContext *moc = [self managedObjectContext];
[moc processPendingChanges];
[[moc undoManager] disableUndoRegistration];
Do the work here
[moc processPendingChanges];
[[moc undoManager] enableUndoRegistration];
On 22 Nov 2007, at 03:40, Grigory Entin wrote:
> 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_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
DATE : Thu Nov 22 12:01:55 2007
You can "join" it with the previous undo like so:
NSManagedObjectContext *moc = [self managedObjectContext];
[moc processPendingChanges];
[[moc undoManager] disableUndoRegistration];
Do the work here
[moc processPendingChanges];
[[moc undoManager] enableUndoRegistration];
On 22 Nov 2007, at 03:40, Grigory Entin wrote:
> 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_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
| 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

