Re: Mixing UIDocument's NSUndoManager and -updateChangeCount:
Re: Mixing UIDocument's NSUndoManager and -updateChangeCount:
- Subject: Re: Mixing UIDocument's NSUndoManager and -updateChangeCount:
- From: Markus Spoettl <email@hidden>
- Date: Mon, 13 Jan 2014 21:38:47 +0100
On 1/13/14 9:13 PM, Kyle Sluder wrote:
But it's just generally a bad practice to violate the framework's stated
assumptions. -updateChangeCount: manages a change counter, not a "force
saving" flag. There's a very clear way to implement a "force saving"
flag that fits within the framework design. The existence of that option
should be entirely sufficient to discount all other approaches.
I can't see any of that in the relevant of the documentation (that I have seen,
I'm probably overlooking something) of the UIDocument.
-updateChangeCount:
------------------
Calling this method can affect the value returned by hasUnsavedChanges. You
should not need to call method this if you access an NSUndoManager object from
the undoManager property (or assign a custom one to it) and register changes
with the undo manager.
------------------
Telling from this that it's a violation using it if you're already using
NSUndoManager just doesn't get across at all (to me anyway). It also doesn't say
so in the Change Tracking section in the overview.
Could you point me to the portion I'm missing?
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
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