• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Handling a very large NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handling a very large NSTextView


  • Subject: Handling a very large NSTextView
  • From: Peter Lennie <email@hidden>
  • Date: Wed, 6 Apr 2005 22:01:36 -0400

I would welcome advice on a text display problem.

I have an NSTextView that uses a subclass of NSTextStorage to provide its underlying text storage. The attributed string is assembled from what is essentially a database of text records that the user can choose to view formatted in different ways. Each database record contributes a short paragraph (~100-200 characters). A change of view can involve reconstruction of the whole attributed string (very fast), and the consequent resetting of its layout (slow). As the database grows large (thousands of records) revising the layout becomes unbearably slow.

Since I can instantly generate the text that corresponds to any arbitrary window into the formatted database I have no need -- except to use the nice text scrolling features available through NSTextView and its enclosing scroll view--for a hugely tall NSTextView and associated NSTextContainer that might hold the tens of thousands of short paragraphs in a formatted document. What I'd like is something like an NSScrollView that works as though it is looking into a very tall text view, but whose actual NSTextView and container are small and can be refilled, (as demanded by the scroll view) with the text that represents the appropriate part of the underlying document.

Can anyone recommend a good way of doing this?

Peter Lennie

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Handling a very large NSTextView
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: C++ string and UTF8
  • Next by Date: Re: C++ string and UTF8
  • Previous by thread: Creating a private embedded framework
  • Next by thread: Re: Handling a very large NSTextView
  • Index(es):
    • Date
    • Thread