Re: Core Data and undo action names
Re: Core Data and undo action names
- Subject: Re: Core Data and undo action names
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 23 Aug 2005 13:14:10 -0400
on 2005-08-23 8:41 AM, Jack Nutting at email@hidden wrote:
> On 8/22/05, Bill Cheeseman <email@hidden> wrote:
>> Some operations not only change a value directly but also trigger secondary
>> changes. In such a case, the undo action name should describe the initiating
>> operation, not the secondary changes, and undoing it will automatically
>> reverse all the secondary changes. But if the secondary changes are
>> accomplished through setters that invoke -setActionName: (because sometimes
>> these setters are invoked directly as an initiating operation), the
>> initiating operation's undo action name gets replaced by the secondary
>> change's undo action name. Whichever secondary change happens last wins.
>
> Why not just call setActionName: in your top-level setter *after*
> performing the secondary changes? Then the top-level setter wins.
The secondary changes are triggered by Key-Value Observing, and I'm not
confident that this happens synchronously. If it does, then perhaps this is
an option.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
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