I am building a new app in Xcode 4 and following the bindings tutorial in chapter 6 of Cocoa Programming for Mac OS X, 2nd Edition.
In my XIB, I have dragged in an NSArrayController
and placed an NSTableView
in my window. The object model class on the array controller is set to URLPrefix
and I have defined the prefix
key. The URLPrefix
model class exists and has a prefix
property of type NSString
.
When I try to bind a column of the table view to the array controller, no paths are available for autocomplete and a little ! appears on the right side of the text field, informing me that "The Value binding expects to be bound to an object of type NSString, but arrangedObjects is of type URLPrefix."
Hours of searching has yielded nothing, and the Xcode 4 Transition Guide doesn't mention any changes to setting up bindings.
I now believe this is a bug in Xcode 4 and I've filed it with Apple. No answer from them, yet.
While the bindings field doesn't offer the expected auto-complete choices, I can type what I expect anyway and the application compiles and runs correctly.
Edit: Apple responded to me today after being unable to reproduce, and I verified it is no longer a problem in Xcode 4.0.2.