Skip navigation.
 
mlRe: Tracking text attribute ranges in NSTextStorage
FROM : Keith Blount
DATE : Wed Apr 06 13:52:27 2005

Many thanks for your reply, that is indeed really
helpful. I found the part in the docs about cycling
through an attributed string by attributes in the way
that you are doing, and that seems exactly what I want
to do.

What I was going to do was use a NotesManager
controller layer to monitor
NSTextStorageDidProcessEditingNotifications and update
all the note ranges there, but I think your solution
of subclassing NSTextStorage is a more efficent option
and I will probably take that route.

Many thanks for the help, I think that solves my
problem, much appreciated.
All the best,
Keith



> Hi,


> I'm doing something very similar in a project of
> mine. I don't know any
> automatic way of doing it, but what I do is this:


> - I have a subclass of NSTextStorage called
> AnnotatedTextStorage. Where
> you have note objects, I have annotation objects.
> - in AnnotatedTextStorage, I override
> replaceCharactersInRange:range

withString:string.
> There is also another method for attributed
> stringes. These methods get called every time the
> content of the TextStorage changes:



       
__________________________________
Yahoo! Messenger
Show us what our next emoticon should look like. Join the fun.
http://www.advision.webevents.yahoo.com/emoticontest

Related mailsAuthorDate
mlTracking text attribute ranges in NSTextStorage Keith Blount Apr 5, 22:35
mlRe: Tracking text attribute ranges in NSTextStorage Knud Möller Apr 6, 12:04
mlRe: Tracking text attribute ranges in NSTextStorage Keith Blount Apr 6, 13:52