• 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
Re: code folding in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: code folding in NSTextView


  • Subject: Re: code folding in NSTextView
  • From: Kyle Sluder <email@hidden>
  • Date: Wed, 24 Mar 2010 09:58:45 -0700

On Mar 24, 2010, at 9:46 AM, Martin Hewitson <email@hidden> wrote:

So, does anyone have any suggestions how one might implement such a feature? This is for a LaTeX editor so I'm interested in folding blocks of code between, for example, \begin{} \end{} tags, collapsing \section, \subsection, etc.

There isn't support for anything like this in NSTextView; you're going to have to mutate the text storage yourself. The upshot of this is that you can no longer keep your text buffer in an NSTextStorage and build your text system around it; you will now need to synchronize the edits made to your text view's text storage with whatever backing store you wind up using for your document (perhaps another NSTextStorage, or a different data structure of your choosing).


--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: code folding in NSTextView
      • From: Martin Hewitson <email@hidden>
References: 
 >code folding in NSTextView (From: Martin Hewitson <email@hidden>)

  • Prev by Date: Layout timing (was Re: setStringValue problems with dynamically loaded views.)
  • Next by Date: Re: Toolbar customizer crashes on Leopard when using menu delegate
  • Previous by thread: code folding in NSTextView
  • Next by thread: Re: code folding in NSTextView
  • Index(es):
    • Date
    • Thread