Printing in a Mac app with multiple philosophies
Printing in a Mac app with multiple philosophies
- Subject: Printing in a Mac app with multiple philosophies
- From: Daryle Walker <email@hidden>
- Date: Sat, 11 Mar 2017 07:22:32 -0500
There are two IBActions for printing in a Mac app, “print:” and “printDocument:”. The Xcode project samples pick one of those actions to use based on if you requested a document-based app or not. But what are you supposed to do in a mixed-app, one with both NSDocument subclasses and printable non-document window systems? The menu item can point to only one action. Do I add a custom action that the menu item points to, and then implement that action in all my printable objects? (Those actions can redirect to “print(Document):” as needed.)
On a related note, what if I have a document class with multiple window types, and when I print I want to use the specific view of the current window? The document class’s print should probably be for total model coverage instead of a sub-view. I guess I can take my own advice from the first paragraph and do a custom print command. Now I have an interface question: what should I name the whole-model and specific window’s sub-view print actions? Should they be totally separate menu items, or with one hidden behind the Option key?
—
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT 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