Re: How to use NSPrintHeaderAndFooter
Re: How to use NSPrintHeaderAndFooter
- Subject: Re: How to use NSPrintHeaderAndFooter
- From: Matt Neuburg <email@hidden>
- Date: Tue, 11 Jul 2006 20:45:11 -0700
- Thread-topic: How to use NSPrintHeaderAndFooter
On Tue, 11 Jul 2006 08:35:48 +0200 (CEST), email@hidden said:
>
> Hello all,
>
>I have a Cocoa text editor that uses (a subclass of) NSTextView. I want
>the headers and footers printed, so I overrode the designated initializer of
>NSTextView as follows :
>
>- (id)initWithFrame:(NSRect)frameRect textContainer:(NSTextContainer
>*)aTextContainer
>{
> if ([super initWithFrame:frameRect textContainer:aTextContainer]) {
> NSUserDefaults *defaults=[NSUserDefaults standardUserDefaults];
> [defaults setBool:YES forKey: NSPrintHeaderAndFooter ];
> }
> return self;
>}
>
> But this doesn't work ... What am I doing wrong ?
The NSTextView is being created in the nib, so initWithFrame:... is never
called. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden