Re: Adding actions to undo manager
Re: Adding actions to undo manager
- Subject: Re: Adding actions to undo manager
- From: Ryan Joseph <email@hidden>
- Date: Tue, 16 Jun 2009 08:18:32 +0700
On Jun 15, 2009, at 10:16 PM, I. Savant 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).
I'm not sure I follow you. How do I know the user wants to undo and
that it was in response to my change of the NSTextStorage? It seems
like one way or another I need to keep a stack of changes with
information on what operation they performed to the NSTextStorage.
Thanks.
Regards,
Josef
_______________________________________________
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