Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Print Menu Item Magic?



It is a question of menu-enabling-magic. Your custom controller is not in the chain of objects that is asked whether to enable the menuItem, but the App Delegate is in that chain. See:

http://developer.apple.com/documentation/Cocoa/Conceptual/MenuList/ Tasks/EnablingMenuItems.html

Patrick.

On 19 Feb, 2006, at 16:25, Thaddeus Cooper wrote:

Hi All --

In a core data application, I created a custom controller for my main window and added a method named printSelectedItems. I tied the Print menu item (in the file menu) to this method through an action in interface builder and re-ran the program. The Print menu item never becomes active. I've tried setting the enabled binding but the Print item stays stubbornly unavailable.

When I moved the functionality to the Application Delegate and tied the action to the method there - the button suddenly works as expected.

Is there some "magic" about the Application Delegate here that I'm missing - or did I miss a set of steps when I tied it to the custom window controller?

Thanks.

--Thaddeus O. Cooper

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Print Menu Item Magic? (From: Thaddeus Cooper <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.