Re: relation between NSTextStorage and appended NSAttributedString
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.