NSTokenField, how to query the selection?
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