CocoaDev

Edit AllPages

Displaying the same text in multiple text views is as easy as replacing the text storage object of a text view with a shared NSTextStorage object.

@interface MyDocument : NSDocument { IBOutlet NSTextView *topTextView, *bottomTextView; } @end

in your document implementation…

}

}

}

}

The nice thing about this is the undo manager will share the same target for edits performed in either view (don’t forget to check “Undo Allowed” in IB for topTextView and bottomTextView). –zootbobbalu