I have a document-based app. For each document there can be a couple of 
satellite windows brought up for specific views of some of the data. Each of 
these satellite windows is controlled by an NSWindowController subclass loaded 
by MyDocument and added via addWindowController:.  A menu item's target is the 
First Responder, and the method to implement the action is in MyDocument. 
Everything works as expected when the primary window is key.

The problem is that when one of the satellite windows is key, menu items 
implemented by MyDocument are disabled. I thought the responder chain went 
through the NSWindowController and then through to its NSDocument? Or is this 
only the case when for the document's primary window (and NSWindowController)?

Note: The work around is trivial. I just implemented the method name in the 
satellite window's NSWindowController subclass and forwarded the call to the 
document:

-(IBAction) doMenuThing: (id)sender
{
        [[self document] doMenuThing: sender];
}

but I feel this isn't the "Cocoa Way" of doing it. Am I missing a configuration 
step?

Todd

_______________________________________________

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