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

Re: NSMutableArray of strings bound to NSTokenField does not update after paste


  • Subject: Re: NSMutableArray of strings bound to NSTokenField does not update after paste
  • From: Rick Hoge <email@hidden>
  • Date: Thu, 11 Jan 2007 10:38:52 -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?

The really weird thing is that if I type - say - "abc" into the NSTokenField, the delegate method - tokenField:shouldAddObjects:atIndex: is called with an array containing the string "abc" with index 0. In spite of the zero index, "abc" is added to the end of the array of strings in the bound instance variable.


If I *paste* the same text into the NSTokenField, - tokenField:shouldAddObjects:atIndex: is also called and with exactly the same arguments: (abc) and the index 0. In this case there is no update to the instance variable.

I have only found a couple of other posts on this and it seems it was not resolved in those threads... I'll post a bug but would be very happy to hear if anyone knows a workaround.

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: [workaround/giving up] NSMutableArray of strings bound to NSTokenField does not update after paste
      • From: Rick Hoge <email@hidden>
References: 
 >NSMutableArray of strings bound to NSTokenField does not update after paste (From: Rick Hoge <email@hidden>)

  • Prev by Date: Re: not receiving kIOMessageCanSystemSleep messages
  • Next by Date: iPhone
  • Previous by thread: NSMutableArray of strings bound to NSTokenField does not update after paste
  • Next by thread: Re: [workaround/giving up] NSMutableArray of strings bound to NSTokenField does not update after paste
  • Index(es):
    • Date
    • Thread