• 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
NSMutableArray of strings bound to NSTokenField does not update after paste
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSMutableArray of strings bound to NSTokenField does not update after paste
      • From: Rick Hoge <email@hidden>
  • Prev by Date: not receiving kIOMessageCanSystemSleep messages
  • Next by Date: Re: fast bitmap image scaling
  • Previous by thread: Re: not receiving kIOMessageCanSystemSleep messages
  • Next by thread: Re: NSMutableArray of strings bound to NSTokenField does not update after paste
  • Index(es):
    • Date
    • Thread