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

How to use NSPrintHeaderAndFooter


  • Subject: How to use NSPrintHeaderAndFooter
  • From: email@hidden
  • Date: Tue, 11 Jul 2006 08:35:48 +0200 (CEST)
  • Importance: Normal

   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 ?

                                                                   Ewan



 _______________________________________________
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

  • Prev by Date: NSStatusItem in Carbon
  • Next by Date: Re: nil pointers
  • Previous by thread: Re: NSStatusItem in Carbon
  • Next by thread: Re: How to use NSPrintHeaderAndFooter
  • Index(es):
    • Date
    • Thread