NSTextStorage undo support
NSTextStorage undo support
- Subject: NSTextStorage undo support
- From: "Hog Bay Software" <email@hidden>
- Date: Mon, 21 Apr 2003 14:51:13 -0000
I've got a notepad program and plan to make each of my note objects subclass NSTextStorage. This will make it easier for me to support applescript and better allow multiple synchronized views on my notes. It will also allow me to transparently load/unload my private NSMutableAttributedString backing store for each of the notes.
Problem is I also want to have undo support when notes are edited, but it seems that all the appkit text undo support is in the NSTextView layer.
Does anyone have any tips on how undo support can be added to NSTextStorage? I understand that I'll probably want to put it in:
replaceCharactersInRange:withString:
setAttributes:range:
or maybe in processEdits? But I also want to coalesce edits as the appkit does... and that made my head start to spin. Any tips on the best way to approach adding undo support to NSTextStorage will be much appriciated.
Thanks,
Jesse
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.