Re: NSTextView: Detecting when caret moves out of line
Re: NSTextView: Detecting when caret moves out of line
- Subject: Re: NSTextView: Detecting when caret moves out of line
- From: Satoshi Matsumoto <email@hidden>
- Date: Fri, 28 Nov 2003 11:11:46 +0900
on 03.11.28 4:39 AM, Jens Bauer at email@hidden wrote:
>
How do I correctly detect if the cursor/caret/insertion point has moved
>
away from a line in a NSTextView ?
You can catch the selection change with following NSTextView delegete
method.
- (NSRange)textView:(NSTextView *)textView
willChangeSelectionFromCharacterRange:(NSRange)oldSelectedCharRange
toCharacterRange:(NSRange)newSelectedCharRange;
If the oldSelectedCharRange is not continuous with newSelectedCharRange,
that is the change you want to detect.
Satoshi
-----------------------------------------------------
Satoshi Matsumoto <email@hidden>
816-5 Odake, Odawara, Kanagawa, Japan 256-0802
_______________________________________________
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.