Re: Why do I receive KVO notification when new value IS the old value?
Re: Why do I receive KVO notification when new value IS the old value?
- Subject: Re: Why do I receive KVO notification when new value IS the old value?
- From: Graham Cox <email@hidden>
- Date: Thu, 9 Jul 2009 10:35:20 +1000
On 09/07/2009, at 10:18 AM, Jerry Krinock wrote:
Maybe this is one of the reasons why it is quite common nowadays
that when a user clicks "Undo" 10 times, something is seen to happen
on only 5 or 6 of the clicks.
This is one of my pet hates too.
NSUndoManager could do with a couple of things adding and/or fixing to
help:
a) optional coalescing of consecutive tasks if they are for the same
property (I subclass NSUndoManager to do this and it's really
excellent for undoing interactive tasks like dragging).
b) not creating an invalid empty undo task when a group is simply
opened and then closed again. Working around this one is very involved
in most cases - far out of proportion to the effect of the bug, but if
you really hate no-op Undos then you have to do it.
c) being less picky about imbalanced group open/close nesting or
allowing the nesting state to be simply reset. It's this pickyness
which, while strictly correct in isolation, leads to the great
complexity of the workarounds needed for b.
--Graham
_______________________________________________
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