• 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
Printing in a Mac app with multiple philosophies
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: More elegance than a long if/else
  • Next by Date: Re: More elegance than a long if/else
  • Previous by thread: struts and springs layout
  • Next by thread: Printing questions
  • Index(es):
    • Date
    • Thread