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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net

This email sent to cocoa...@mikeabdullah.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to