disabling Print in modal panel
disabling Print in modal panel
- Subject: disabling Print in modal panel
- From: Jim Matthews <email@hidden>
- Date: Wed, 11 Jun 2008 10:38:39 -0400
How would I go about disabling the Print command for a modal panel?
The nil-targetted menu item is currently enabled because the first
responder is an NSTextField, which implements the print: selector.
But I don't really want users printing out individual NSTextFields.
I could subclass NSTextField (and every other NSControl in the window
that implements print:) and implement validateMenuItem:, but that
seems awkward. Another option would be to set the Print menu item's
target to my controller object while the panel is up (and implement
validateMenuItem:), and restore it to nil afterwards. Is that the
recommended approach, or is there something better?
Thanks,
--
Jim Matthews
Fetch Softworks
http://fetchsoftworks.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden