• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextView: Detecting when caret moves out of line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSTextView: Detecting when caret moves out of line
      • From: Jens Bauer <email@hidden>
References: 
 >NSTextView: Detecting when caret moves out of line (From: Jens Bauer <email@hidden>)

  • Prev by Date: Using gcc
  • Next by Date: prebinding hell
  • Previous by thread: NSTextView: Detecting when caret moves out of line
  • Next by thread: Re: NSTextView: Detecting when caret moves out of line
  • Index(es):
    • Date
    • Thread