• 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
NSTokenField, how to query the selection?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTokenField, how to query the selection?


  • Subject: NSTokenField, how to query the selection?
  • From: Tim Gogolin <email@hidden>
  • Date: Tue, 2 May 2006 15:08:02 -0500

How do I get the current selected range of a NSTokenField?

I want to implement a UI widget that sits next to a NSTokenField which will change the value of the token field. By using objectValue and setObjectValue:, I can easily *append* a new value to what is displayed in the token field, but that doesn't feel particularly natural if the token field has a blinking insertion point. I'd expect the new text or token to be inserted at the insertion point. Or if there is a text selection (possibly spanning some text and some tokens?), I'd expect the selected text and tokens to be deleted and my new information inserted at that location.

Because the value of an NSTokenField is an NSArray, instead of an NSString, I understand that the concept of "selection" might be more complicated than a normal NSTextField, but I can't seem to find any APIs that will get me this information.

--
Tim Gogolin
Adobe Systems

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTokenField, how to query the selection?
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: saveGraphicsState vs. lockFocus
  • Next by Date: Re: InstantMessage.framework
  • Previous by thread: Fwd: saveGraphicsState vs. lockFocus
  • Next by thread: Re: NSTokenField, how to query the selection?
  • Index(es):
    • Date
    • Thread