• 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: relation between NSTextStorage and appended NSAttributedString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: relation between NSTextStorage and appended NSAttributedString


  • Subject: Re: relation between NSTextStorage and appended NSAttributedString
  • From: Arthur Clemens <email@hidden>
  • Date: Mon, 7 Oct 2002 23:11:24 +0200

The reason my program got mixed up is that I wanted to have different
insertion and navigation behaviours for different sections in the text
view. So I thought up some NSMutableAttributedString subclasses that
did that. But they stopped working after inserting some more text in
the text view / NSTextStorage.
So I figured that I needed to update the contents of these subclasses
when the text storage got updated. This did not work out well and was
all to complicated.

Now I am using a Compositor (Strategy) pattern with subclasses that
have the brains to handle different ways of text insertion and
navigating, like:
[_singleFieldCompositor insertText:aString inView:self atLoc:loc]
This works better and is quite easy to expand.

Thanks for all insights into NSTextStorage.

Arthur
_______________________________________________
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.

  • Prev by Date: Re: Using a framework like a bundle
  • Next by Date: Re: NSArray enumerator orders- interface or implementation detail? also: removing conditional statements
  • Previous by thread: Re: relation between NSTextStorage and appended NSAttributedString
  • Next by thread: dna.icns app icon minor bug
  • Index(es):
    • Date
    • Thread