Re: [ANN] Coalescing undo in Cocoa
Re: [ANN] Coalescing undo in Cocoa
- Subject: Re: [ANN] Coalescing undo in Cocoa
- From: Will Thimbleby <email@hidden>
- Date: Mon, 24 Oct 2005 21:15:38 +0100
Opps misspelt on my part, fixed now.
Because NSUndoManager groups all operations within a single cycle of
the run loop, this doesn't cause a problem. However if you turn this
off using setGroupsByEvent and then don't use groups --maybe. I'm not
sure how NSUndoManager handles undo outside of any grouping or even
if it can.
However for all normal operation it works great. The test app should
show it working perfectly for you.
Will
On 24 Oct 2005, at 9:04, glenn andreas wrote:
On Oct 24, 2005, at 2:40 PM, Will Thimbleby wrote:
Hi, after some hacking around I've created a simple subclass of
NSUndoManager that automatically coalesces skippable methods for
you. I've found it very useful, so I've polished it up with a bit
of info here:
http://will.thimbleby.net/undo.html
Let me know what you think.
--cheers
Will
The source is 404, so I can't tell if handles this case, but from
the description, it doesn't sound like it:
What happens when the user moves (say) a slider (making a whole
bunch of little changes which are then nicely combined into a
single change) and lets go of the mouse, and then changes the
slider a second time. I'm betting that they'd expect the "undo" to
only undo the last change (and not both, which is going to happen
since the two setValues were coalesced into one undo action).
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | build, mutate, evolve | images, textures, backgrounds, art
_______________________________________________
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