Re: Best way to hook into the run loop?
Re: Best way to hook into the run loop?
- Subject: Re: Best way to hook into the run loop?
- From: Graham Cox <email@hidden>
- Date: Mon, 7 Dec 2009 00:55:30 +1100
Ah, thanks for that little glimmer of encouragement! If it's good enough for WS, it's good enough for me.
I guess my problems stem from the fact that my app is heavily based on mouse dragging gestures, and mouse dragging is a whole series of events. The undo manager is maybe not so well designed to group tasks that are distributed across a series of events, but is mostly based on the idea that anything that's going to happen will happen within a single event cycle.
My own implementation is definitely designed with the mouse dragging usage in mind, so perhaps it's more suitable in this situation but possibly not in every other case. I feel a little more confident that I'm not totally barmy for taking this approach.
I'd still like to know where in the MVC picture undo is ideally supposed to sit however.
--Graham
On 07/12/2009, at 12:30 AM, Andy Lee wrote:
> On Dec 6, 2009, at 7:36 AM, Graham Cox wrote:
>> My fourth approach is to write my own bloody undo manager and have done with it. Result so far - bliss.
>
> FWIW, Wil Shipley agrees about the bliss part:
>
> <http://wilshipley.com/blog/2007/12/transitions-and-epiphanies.html>
>
>> I was so into using CoreData's magic undo that I kept going farther and farther to make it work, when I really needed to say, "Ok, this doesn't work in this situation, I'm doing my own undo in 40 lines of code."
>
> I haven't worked with NSUndoManager myself, but my takeaway from this (and also from a friend who was also frustrated with it) is that it's great for very basic scenarios, but if I ever find myself getting frustrated with it I shouldn't hesitate to write my own.
>
> --Andy
>
>
_______________________________________________
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