NSMutableArray of strings bound to NSTokenField does not update after paste
NSMutableArray of strings bound to NSTokenField does not update after paste
- Subject: NSMutableArray of strings bound to NSTokenField does not update after paste
- From: Rick Hoge <email@hidden>
- Date: Thu, 11 Jan 2007 00:32:55 -0500
I have an NSTokenField object that is bound to an NSMutableArray of
NSStrings. If I type text into the field, the newly entered text is
tokenized at the end of editing (i.e. hitting tab) and the array is
updated with the new string added to the array at the correct index
(the setMyArray accessor is called).
If, however, I *paste* the same text into the NSTokenField, the array
is not updated. Does anyone have an idea how this might be remedied?
I have implemented the NSTokenField delegate methods -
tokenField:readFromPasteboard and -tokenField:shouldAddObjects:atIndex:
The second delegate method is called when you type text into the
field and when you paste text into the field. The first is called
when I do a paste (and I do grab the string type from the pasteboard
and return it).
Thanks for any suggestions on how to get pasting to work!
Rick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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