NSArrayController and NSTokenField Bindings

Discussion in 'Mac Programming' started by BollywooD, Jul 31, 2010.

  1. BollywooD macrumors 6502

    BollywooD

    Joined:
    Apr 27, 2005
    Location:
    Surfers Paradise
    #1
    Im having a little trouble getting this to work.

    Are there any good tutorials online that deal with this king of relationship?
    :confused:
     
  2. misee macrumors member

    Joined:
    Jul 4, 2010
    #2
    A good resource would probably be the NSTokenField Programming Guide.
    I haven't used token fields before, but as far as I know it's a subclass of NSTextField and the bindings offered in interface builder look fairly alike, so you probably want to bind the token fields value to a string or number, not an array. If you want to get the different strings, you can use NSStrings componentsSeparatedByCharactersInSet: to get the different parts. You can get the tokenizing character set with NSTokenFields tokenizingCharacterSet method. You might have to make some changes to what I wrote since I didn't test this or ever used NSTokenField, so I don't know how good it works.
     
  3. BollywooD thread starter macrumors 6502

    BollywooD

    Joined:
    Apr 27, 2005
    Location:
    Surfers Paradise
    #3
    I ended up getting rid of the arraycontroller/bindings, and doing it manually.
    :eek:
     

Share This Page