Hi,
I have started on a little code editor that uses an NSTextStorage delegate to modify keywords etc as they are typed into an NSTextView.
It almost works, but the cursor location changes when the text is modified by 'replaceCharactersInRange' within the delegate.
The cursor appears to be jumping to the last character in the replacement range, which is sometimes ahead of the actual 'typing' cursor location.
Is there anyway to either lock the cursor location, or read it from the NSTextStorage?
Thanks in advance for any hints.
Bye!
Mark
I have started on a little code editor that uses an NSTextStorage delegate to modify keywords etc as they are typed into an NSTextView.
It almost works, but the cursor location changes when the text is modified by 'replaceCharactersInRange' within the delegate.
The cursor appears to be jumping to the last character in the replacement range, which is sometimes ahead of the actual 'typing' cursor location.
Is there anyway to either lock the cursor location, or read it from the NSTextStorage?
Thanks in advance for any hints.
Bye!
Mark