Skip navigation.
 
mlRe: Keeping track of new user selections in NSTextView
FROM : Antonio Nunes
DATE : Sat Jul 01 13:16:24 2006

On 1 Jul 2006, at 11:53, <email_removed> wrote:

>  I'm looking for a  method in NSTextView
> that gets triggered exactly when the user selects a portion of text
> [...] It seems that there always is
> a "default" selection even when the user has actually selected 
> nothing. So
> where is the method I need ?


Checking the range of the selection will tell you whether the 
selection is extended or not. Check the "selectedRanges" method of 
the NSTextView to decide whether you need to process the 
notification. (The notification will still be triggered every time 
the text is modified though.)

HTH,
António

-----------------------------------------------------------
What you have inside you expresses itself through both your
choice of words and the level of energy you assign to them.
The more healed, whole and connected you feel inside,
the more healing your words will be.

--Rita Goswami
-----------------------------------------------------------

Related mailsAuthorDate
mlKeeping track of new user selections in NSTextView delanoy Jul 1, 12:53
mlRe: Keeping track of new user selections in NSTextView Antonio Nunes Jul 1, 13:16