Re: NSArrayController setSelectedObjects: not working with newly created objects

2008-12-07 Thread mmalcolm crawford
On Dec 7, 2008, at 8:29 AM, Matteo Manferdini wrote: NSManagedObject *newObject = [arrayController newObject]; [arrayController setSelectedObjects:[NSArray arrayWithObject:newObject]]; If I call [arrayController selectedObject] just before these two lines, the array returned contains the ac

NSArrayController setSelectedObjects: not working with newly created objects

2008-12-07 Thread Matteo Manferdini
Hi everyone, I stumbled into another weird behaviour of Cocoa. If I try to set as selected newly created objects into an NSArrayController, the method does not work and the controller loses its selection. The array controller is bound to a core data managed object context. Here there is the code: