On Jul 27, 2008, at 7:09 PM, glenn andreas wrote:
If you call [NSGraphicsContext currentContext] before your
setCurrentContext:, what do you get back?
Whatever that is, that's the context to restore with a second
[NSGraphicsContext setCurrentContext: ] at the end...
Pay no attention to what the CGGraphicsContext is - there is no
such thing as a "current" CGGraphicsContext (since
CGGraphicsContext routines all take the context as an explicit
parameter) - it's only the implicit NSGraphicsContext that matters.
Thanks Glenn.
Saving/restoring the context with
*oldContext = [NSGraphicsContext currentContext];
[NSGraphicsContext setCurrentContext: oldContext];
Did the trick. No more crashes.
Thanks again.
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]