On 22/02/2011, at 9:24 AM, Bruce Cresanta wrote:

> Hello,
> 
>       I'm working with NSDocument.   I only have one view that I would like 
> to print, but I don't see a method in NSDocument that takes an NSView 
> parameter.    How do I print only one view in an NSDocument?


You override: - (NSPrintOperation *)printOperationWithSettings:(NSDictionary 
*)printSettings error:(NSError **)outError in your document, and create a 
NSPrintOperation. The NSPrintOperation takes a view parameter where you can 
nominate the printing view.

--Graham



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to