• 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
textViewDidChangeSelection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

textViewDidChangeSelection


  • Subject: textViewDidChangeSelection
  • From: Jeremy Dronfield <email@hidden>
  • Date: Wed, 19 Jun 2002 18:28:40 +0100

I've got the following method which enables a button when text in a TextView is selected:

- (void)textViewDidChangeSelection:(NSNotification *)aNotification
{
[[self markButton] setEnabled:YES];
}

It works, but I really want to know how to make it conditional, so that if the text is deselected, markButton is disabled again. I've messed about with various if's using selectedRange, but can't get anything to work. The problem seems to be that I don't know how to access selectedRange's length.

- Jeremy
_______________________________________________
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: textViewDidChangeSelection
      • From: John Anderson <email@hidden>
  • Prev by Date: Re: Address from NSSocketPort
  • Next by Date: Re: Protecting Software w/ Software License Keys...
  • Previous by thread: Re: Protecting Software w/ Software License -- a modest
  • Next by thread: Re: textViewDidChangeSelection
  • Index(es):
    • Date
    • Thread