NSString drawAtPoint is not NSTimer safe ?
NSString drawAtPoint is not NSTimer safe ?
- Subject: NSString drawAtPoint is not NSTimer safe ?
- From: Stéphane Sudre <email@hidden>
- Date: Wed, 31 Oct 2001 19:24:05 +0100
I'm facing what I think may be a bug in the NSString additions of the
AppKit.
In my window, I have a PopUpButton and a Custom Widget.
The custom widgets owns a NSTimer which is going to call every second a
method which does the following things:
- some computing
- [self setNeedsDisplay:YES];
Everything works fine as long as I don't have a NSString drawAtPoint
call in my custom widgets drawRect method.
As soon as there is a NSString drawAtPoint call, the following problem
occurs :
When I click on the PopUpMenu and then changes the selected item, I'm
getting this in the Console:
Oct 31 19:12:21 coyotte
/Users/stephane/Projects/MyApplication/build/MyApplication.app/Contents/MacOS/
MyApplication: kCGErrorIllegalArgument : CGSSetWindowAlpha: Invalid
window
And if I'm repeating this, at one point, I'm no more able to select an
item in the Menu Bar: be it one of my menu or the Apple Menu.
A soon as I remove the call to NSString drawAtPoint, the problem does
not occur anymore.
I tried to play with the NSGraphicsContext stack/heap with no success.
Strange...