Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSString drawAtPoint is not NSTimer safe ?



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...




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.