Re: Two views of same text
Re: Two views of same text
- Subject: Re: Two views of same text
- From: Douglas Davidson <email@hidden>
- Date: Tue, 11 Nov 2003 15:17:42 -0800
On Nov 11, 2003, at 1:09 PM, John Nairn wrote:
One of the next steps in my application will let a user view the same
text two different ways. It is exactly analogous to XCode/Project
Builder when viewing a source file in the main window and in a
separate window at the same time. Naturally changes made in one view
should instantly appear in the other view if both views are currently
open. Does someone have experience at such an interface? Should it:
a. Have two separate text views with separate text storage and
broadcast all text edits in one view to all other views to see if they
should be incorporated.
b. Or is there a way for them to share the same text storage which
would (hopefully) automatically update all views when one view is
changed?
The Cocoa text system is designed to support this usage. All you have
to do is arrange for multiple layout managers to use the same text
storage. Take a look at the concept documentation, and at the
TextViewConfig example.
Douglas Davidson
_______________________________________________
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.