• 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
Re: How to use NSPrintHeaderAndFooter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How to use NSPrintHeaderAndFooter
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Terminating from Separate Thread
  • Next by Date: Re: scrolling NSTextView over NSImageView
  • Previous by thread: How to use NSPrintHeaderAndFooter
  • Next by thread: Re: How to use NSPrintHeaderAndFooter
  • Index(es):
    • Date
    • Thread