error message :
Cannot find object class with name BKSubProjthe Class:
class BKSubProj : NSObject{
var name : String = "subProjectName"
var extensions : [String:NSURL] = [:]
}I have an array controller instantiated in the XIB file.
I have a manager class which is also instantiated in the XIB file:
class BKSubProjMan : NSObject {
@IBOutlet weak var subProjectController: NSArrayController!
@IBOutlet weak var extensions: NSArrayController!
// this is thae array that the subProject controller is bound to.
var subProjectArray : [BKSubProj] = []
@IBAction func newSubProject(object: AnyObject) {
}
@IBAction func removeSubProject(object: AnyObject) {
}
@IBAction func manageInFinder(object: AnyObject) {
}
}there is a button hooked up to the subProjectArrayController's add: action.
when clicked, I get the error.
this happens often enough, that I suspect my sanity. Either it's a step I'm skipping, or it's a bug.
thoughts?
OK, I took a shot at this myself and I got it to work. Here’s my BKSubProj class.
@objc(BKSubProj) class BKSubProj : NSObject {
var name : String = "subProjectName"
var extensions : [String:NSURL] = [:]
}[Yes, that’s
@objc, not
@obj. Sorry about the bum steer there.]
I then put
BKSubProj in the array controller’s Class field in IB. With that I was able to bind a table to the array controller, add elements to the array controller via
-add:, and see each element in the table.
I’m not sure what’s going wrong in your specific setup but I think I’ve taken this about as far as I can in the context of DevForums. If you get completely stuck, you should open a DTS tech support incident and we can help you in a more formal context.
Share and Enjoy
—
Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"