Re: Enabling the Print… menu item for an NSView
Re: Enabling the Print… menu item for an NSView
- Subject: Re: Enabling the Print… menu item for an NSView
- From: Thomas Lachand-Robert <email@hidden>
- Date: Thu, 16 Sep 2004 07:38:55 +0200
Le 15 sept. 04, à 21:16, Marc Danguy a écrit :
I have an application with NSDocument based windows, and one NSView
based window
This last window have is own toolbar, so I can Print from the Printer
toolbarItem.
But I can't enable "Page setup…" and 'Print…" items of the "File" menu.
I have implement "validateMenuItem" in my WindowController, but I
receive only the "Select all" message.
Read
file:///Developer/ADC Reference Library/documentation/Cocoa/
Conceptual/MenuList/index.html
The menu items are autmatically enabled if something in the responder
chain responds to their action, so you just have to implement -print:
in your NSView. The purpose of validateMenuItem is gain more
granularity in this process, but you don't need it in such a simple
case.
Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet à la chose. >> Molière, Tartuffe.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden