• 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: Making a control draw while I'm in a (tightish) loop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making a control draw while I'm in a (tightish) loop


  • Subject: Re: Making a control draw while I'm in a (tightish) loop
  • From: "Erik M. Buck" <email@hidden>
  • Date: Mon, 21 Jan 2002 22:19:23 -0600
  • Organization: EMB & Assocites Inc.

> - (void) setPageNumber {
//> NSMutableString *page = [[[NSMutableString alloc] init]
autorelease];
NSMutableString *page = [[NSMutableString alloc] init]; // no reason
to autorelease
> [page appendString: @"Page: "];
> [page appendString: [[NSNumber numberWithInt: m_currentPage+1]
stringValue]];
> [[pageNumber cell] setTitle: page]; // you could probably just use
[pageNumber setStringValue:page];
[page release]; // if [pageNumber cell] wants page it has already
retained it

// I assume pageNumber is a NSControl subclass
[pageNumber display]; // Note: not -setNeedsDisplay:

// the following may also be needed
[[NSGraphicsContext graphicsContextWithWindow:[pageNumber window]]
flushGraphics];
> }


References: 
 >Making a control draw while I'm in a (tightish) loop (From: Andy <email@hidden>)

  • Prev by Date: Re: NSGlyph is still a puzzle
  • Next by Date: Re: Initializing an Array
  • Previous by thread: Making a control draw while I'm in a (tightish) loop
  • Next by thread: HTML Parsing Follow-up
  • Index(es):
    • Date
    • Thread