NSTokenfield keyDown intercept and selects all tokens on startup
NSTokenfield keyDown intercept and selects all tokens on startup
- Subject: NSTokenfield keyDown intercept and selects all tokens on startup
- From: Bastian Hundt <email@hidden>
- Date: Mon, 10 Mar 2008 16:04:22 +0100
Hi,
first of all: I'am a newby on cocoa and mac development. I'am coming
from the windows C# and .NET world so please be patient with me :)
This is the situation: I have a NSTokenField which will be filled with
some data and than be displayed (on a HUD Window).
Now I have two problems.
1. When I insert some data (NSString's) with setObjectValue into the
NSTokenField than all these inserted token are selected when my
NSTokenField is displayed. How can I deselect the tokens and place the
cursor at the end of the tokens so the user is able to enter the next
text/token straight away? These topic was on this mailing list some
time ago but I find no answer.
2. I need to intercept some keyDown events to the NSTokenField.
Overwriting keyDown and acceptsFirstResponder did not work. I read
something about a NSFieldEditor which is used in the NSTokenField and
all keyDown events are directly send to this NSFieldEditor. Has
someone a idea how I can intercept keyDown events and decide if I will
respond to them or the original NSTokenField?
Thank you very much in advance!
Bastian Hundt
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden