Re: this class is not key value coding-compliant ...
Re: this class is not key value coding-compliant ...
- Subject: Re: this class is not key value coding-compliant ...
- From: Mike Abdullah <email@hidden>
- Date: Sun, 18 Jan 2009 15:15:41 +0000
I would guess that your binding is to the the model ket "rootArray"
and the controller key "selection" (or similar). The result is a
combined keypath of "selection.rootArray", not "rootArray" as you
expect.
In IB, you should be able to just delete the controller key and solve
the problem.
On 18 Jan 2009, at 15:02, Ken Tozier wrote:
Hi
I'm getting the runtime error "this class is not key value coding-
compliant for the key rootArray." for my app controller class,
despite the fact that the controller absolutely, positively does
have a "rootArray" accessor and that accessor is defined in both the
interface and implementation files. Why can't the bindings mechanism
see this accessor?
Here's the relevant code:
@interface AppController : NSObject
{
PMXAdminModel *model;
PMXAdminController *controller;
}
- (NSArray *) rootArray;
@end
@implementation AppController
- (void) awakeFromNib
{
model = [[PMXAdminModel alloc] init];
controller = [[PMXAdminController alloc] init];
NSLog(@"model: %@", model);
NSLog(@"controller: %@", controller);
}
- (NSArray *) rootArray
{
return [model rootArray];
}
@end
Here are the bindings:
The content of an NSArrayController inside the "PMXAdmin.nib" is
bound to Application-> rootArray
Anyone see the problem?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden