Binding NSTokenField

Christiaan Hofman cmhofman at gmail.com
Mon Oct 8 14:32:32 PDT 2007


Hi list,

I'm having trouble binding an NSTokenField. I want to bind to an  
array of custom objects, which have a string representation for  
display. So I bind the value of the NSTokenField to a key for an  
NSArray of my controller. The controller is also the NSTokenField's  
delegate, and implements  
tokenField:displayStringForRepresentedObject: delegate method, to  
return the string representation of the custom object. However when I  
try to run this app, the tokenField is not filled and I get lots of  
log messages like the following:

represented objects must either be an NSString or you must implement  
the displayStringForRepresentedObject: delegate method.

Well, as I said I *did* implement this delegate method. Is this a  
(known) bug? Or did I miss something?

Christiaan



More information about the MacOSX-dev mailing list