nstokenfield with coredata

Discussion in 'Mac Programming' started by MrFusion, Aug 12, 2006.

  1. MrFusion macrumors 6502a

    Jun 8, 2005
    The NSTokenField can be used with coredata by giving it an array of strings. In your accessors code (set<Key>) you need to convert this array to whatever you want to use it for. It is not really mentioned in the docs, from reading them I got the impression nstokenfield would only accept a NSString but it doesn't.

    It works nice but for one issue. Hitting enter accepts the (additional) input as an token, but only after hitting enter a second time does it propagate to coredata. In other words, hitting enter once enters the data, hitting enter again saves it in the context/store.

    Does anyway have an hint about how to save the data directly after the first enter?

Share This Page