• 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
Text architecture question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Text architecture question


  • Subject: Text architecture question
  • From: Erik Hanson <email@hidden>
  • Date: Fri, 22 Oct 2004 21:30:58 -0700

Hi,

I'm trying to put together a window that displays text in a certain way, but I'm having a hard time figuring out how to architect it all (this is my first Cocoa app).

Briefly, the window will display text much like the comments are displayed on Slashdot. That is, the window contains many (100+) chunks of text, each of which may be a different length. The chunks will be nested in a hierarchy. I'd also like to put in a disclosure triangle control to show and hide a chunk's children.


My initial implementation used one NSTextView for each chunk. But the performance of all of those NSTextViews was pretty bad (resizing a window with 100 NSTextViews was noticeably slow). I've read that cells are faster than views, but I haven't figured cells out completely yet.

My next thought was to use one NSText view and use paragraph styles to control the indenting, but I haven't been able to figure out how to embed a control (the disclosure triangle button) in the view.

I had also thought about using an NSOutlineView, but it won't allow cells of varying heights. I found a third-party outline view with resizable rows [1], so I might be able to use that. I was sort of hoping to have the disclosure triangle indented along with the rest of the text, but I can probably live without this.


Does anyone have any suggestions as to the best architecture for this type of window?


Thanks,
Erik Hanson

_______________________________________________
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: Text architecture question
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: Problems using -writeToFile:atomically: from a NSMutableArray
  • Next by Date: Global User Agent?
  • Previous by thread: Re: ADC TV w/ ADC Select
  • Next by thread: Re: Text architecture question
  • Index(es):
    • Date
    • Thread