• 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
Re: Enabling the Print… menu item for an NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Enabling the Print… menu item for an NSView (From: Marc Danguy <email@hidden>)

  • Prev by Date: Catching Up/Arrow key presses in a text field
  • Next by Date: Re: Using External C Libraries with Objective-C
  • Previous by thread: Enabling the Print… menu item for an NSView
  • Next by thread: NSAppKitVersionNumber for 10.3.0?
  • Index(es):
    • Date
    • Thread