• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
File's owner and delegate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: File's owner and delegate
      • From: Allan Odgaard <email@hidden>
  • Prev by Date: Re: License Key Generation/Management
  • Next by Date: Re: NSBezierPath, flipped Glyphs, and NSOutlineView
  • Previous by thread: Re: License Key Generation/Management
  • Next by thread: Re: File's owner and delegate
  • Index(es):
    • Date
    • Thread