Re: Adding actions to undo manager
Re: Adding actions to undo manager
- Subject: Re: Adding actions to undo manager
- From: "I. Savant" <email@hidden>
- Date: Mon, 15 Jun 2009 11:16:19 -0400
On Jun 15, 2009, at 3:35 AM, Ryan Joseph wrote:
Thanks. What a challenge just for some basic undo support, there
really should be something simpler than this.
There is, and it's already been suggested.
If you want higher-level functionality, use the higher-level
facilities of the text system (such as NSTextView's own convenience
methods like -changeColor:, -insertText:, or -alignJustified:). Or use
the methods inherited by NSTextView from NSText and on up the lineage
(such as -cut:/-copy:/-paste:, -changeFont:, -underline:, -
capitalizeWord:, -yank:, and so on).
If, on the other hand, you need to do something highly-specific to
your application (which is not already covered by a higher-level
convenience method), only you know what those changes mean, whether
they should be undoable, and how that undo should be handled.
Therefore, it's up to you to implement it.
--
I.S.
_______________________________________________
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