Re: Making a control draw while I'm in a (tightish) loop
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];
>
}