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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to