File's owner and delegate
File's owner and delegate
- Subject: File's owner and delegate
- From: Joakim Danielson <email@hidden>
- Date: Wed, 12 May 2004 14:21:40 +0200
I'm trying to bind the content of a NSObjectController to an ivar in my
controll class but I end upp with the error message
"[<NSWindowController 0x348b20> valueForUndefinedKey:]: this class is
not key value coding-compliant for the key delegate."
Some background:
This is an non-document based application with each window in a
separate nib-file. In MainMenu.nib I have an object called
AppController (NSObject) wich handles the loading of windows after a
menu item have been choosen. Here's one example:
- (IBAction)showAdminTransactions:(id)sender {
if (_wcTransactions == nil) {
_wcTransactions = [[NSWindowController alloc]
initWithWindowNibName:@"Transaction"];
}
[_wcTransactions showWindow:self];
}
In IB I have an instance of my controll class and connected it as a
delegate to File's owner (NSApplication) and for the NSObjectController
binding objectContent I have written delegate.transaction and set Bind
To: to File's owner.
So why is NSWindowController the receiver of "delegate" and not my
controll class? What am I missing?
Joakim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.