0/09, Alastair Houghton wrote:
> From: Alastair Houghton
> Subject: Re: Maintaining an ordered array of attributes in an NSTextStorage
> subclass
> To: "Keith Blount"
> Cc: "Graham Cox" , cocoa-dev@lists.apple.com
> Date: Monday, August 10, 2009, 9:22 PM
On 10 Aug 2009, at 21:07, Keith Blount wrote:
Many thanks again for the reply, much appreciated. -
replaceCharactersInRange:withString:, -setAttributes:range: (and -
addAttribute:value:range:, which also needs overriding) is in fact
exactly where I'm trying to intercept things. The problem is
Many thanks again for the reply, much appreciated.
-replaceCharactersInRange:withString:, -setAttributes:range: (and
-addAttribute:value:range:, which also needs overriding) is in fact exactly
where I'm trying to intercept things. The problem is _how_ best to maintain and
keep up to date the a
On 10/08/2009, at 11:21 PM, Keith Blount wrote:
Thanks for the reply. I guess I lost the point in my long, rambling
e-mail, so sorry about that. What I really meant to ask is *how* to
maintain this list accurately. Given that the attribute can be
added, removed, text can be copied and past
associated with it might be cut
in half and so on, what is the best approach for keeping this list updated as
the text changes?
Thanks again and all the best,
Keith
--- On Mon, 8/10/09, Graham Cox wrote:
> From: Graham Cox
> Subject: Re: Maintaining an ordered array of attributes
On 10/08/2009, at 10:55 PM, Keith Blount wrote:
does anyone have any better ideas as to how I might approach this?
Don't know if "better", but why not just maintain the list you need
yourself? You could either subclass NSTextStorage and add a comment
array, or make another object that co
Hello,
I'm trying to implement comments in an NSTextStorage subclass. The
implementation of comments themselves is pretty simple:
- I have a KBCommentsAttributeName custom attribute that gets assigned to
ranges of text in my controller using the -addAttribute:value:range: methods.
- This attri