Re: Printing with exotic margins (a basic example)
Re: Printing with exotic margins (a basic example)
- Subject: Re: Printing with exotic margins (a basic example)
- From: "Ewan Delanoy" <email@hidden>
- Date: Mon, 14 May 2007 07:26:53 +0200 (CEST)
- Importance: Normal
>You don't show in your code where yellowView comes from.
In fact, as the keyword "IBOutlet" suggests in
@interface MyDocument : NSDocument{
IBOutlet YellowView* yellowView;
}
this is an outlet inMyDocument.nib. And as I said in my OP, I know
that this part is set correctly because on runtime the yellow view appears
in the main window.
> In my printing code I alloc/init the NSView subclass that is passed to
>printOperationWithView and then release it at the end of the
>printShowingPrintPanel method.
You need to do that only when the "printable view" must be different
from the original view. In my case yellowView is already printable as it is,
so I don't need to create a special view for printing.
>Is yellowView already added to another window?
There is no "other window" in my basic example, just the main window.
>If so that probably
>won't work.
Why not ?
Ewan
>
>> the (rather simple) code below produces a blank page instead of the
>> expected yellow rectangle. Is it a bug or have I done something
>> wrong ?
>> (the point of this example is to test printing with exotic margins)
>
> You don't show in your code where yellowView comes from. In my
> printing code I alloc/init the NSView subclass that is passed to
> printOperationWithView and then release it at the end of the
> printShowingPrintPanel method.
>
> Is yellowView already added to another window? If so that probably
> won't work.
>
> --
> Brian Stern
> email@hidden
>
>
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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