View Full Version : Cannot create BOOL from object NSControllerObjectProxy

Oct 25, 2007, 08:28 PM
I'm just starting to learn how to program Cocoa, and I'm following along in the NSPersistentDocument tutorial. But I'm getting this strange error message when I run my application:

Cannot create BOOL from object <_NSControllerObjectProxy: 0x3a8650> of class _NSControllerObjectProxy

This happens when the user clicks on my "Add" button and I try to open up a panel with the following code:

NSBundle *myBundle = [NSBundle bundleForClass:[self class]];
NSNib *nib = [[NSNib alloc] initWithNibNamed:@"NewRouterSheet" bundle:myBundle];
id retval = [nib instantiateNibWithOwner:self topLevelObjects:nil];

The error happens when the last line is executed.

I've checked everything and my NIB looks exactly the same as the downloaded example NIB from Apple.

Does anyone have any ideas or hints for me?

Thanks so much!


Oct 26, 2007, 07:31 AM
I believe it has to do with binding a control to a BOOL. Try reading through this (http://www.cocoabuilder.com/archive/message/cocoa/2004/6/1/108617) thread for more info.