Re: NSTokenField, how to query the selection?
Re: NSTokenField, how to query the selection?
- Subject: Re: NSTokenField, how to query the selection?
- From: Nick Zitzmann <email@hidden>
- Date: Tue, 2 May 2006 15:08:18 -0600
On May 2, 2006, at 2:57 PM, Tim Gogolin wrote:
So I guess I've solved my problem... but there's a reason people
don't document some interfaces... Sigh.
Does anyone know a better supported way to do this?
If -fieldEditor:forObject: didn't work, then there probably isn't any
other documented way. The only way to obtain the selected range of
some text is to query its field editor, and NSTokenField uses a
private field editor class called NSTokenTextView. I was hoping the
NSWindow method would return it, but if it doesn't, then you may have
to acquire the selection the unofficial way (although I'd recommend
using -respondsToSelector: so you minimize breakage). Better yet,
file a bug report asking that NSTokenTextView be made public.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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