Re: Writing a non-NSDocument based multiple document window apps
Re: Writing a non-NSDocument based multiple document window apps
- Subject: Re: Writing a non-NSDocument based multiple document window apps
- From: "Louis C. Sacha" <email@hidden>
- Date: Sun, 14 Mar 2004 12:05:53 -0800
Hello...
In InterfaceBuilder, connect the menu items in the MainMenu.nib to
the "First Responder" object alias in that nib. At run time, this
will end up directing them to the active window if one exists (which
would be your document window).
This is mentioned in the documentation somewhere, but I can't
remember where at the moment. It might be in the InterfaceBuilder
release notes or docs, and not the normal Cocoa documentation.
Hope that helps,
Louis
OK, this one is baffling me and, surprisingly, the online documents
make no mention of this.
any menu/UI validation code will need to move to the NSDocument
subclass, and you'll need to have menu items that you've wired up
yourself that don't interact with firstResponder switch to that
design.
If my main menu is in MainMenu.nib but the code to validate and
respond to each item is in the document subclass, how do I hook up
the two? I tried dragging MyDocument.h into MainMenu.nib but that
didn't work. Do I have to route all commands through an application
controller class?
- Steve
_______________________________________________
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.