Mailing Lists: Apple Mailing Lists

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

Re: NSImage lockFocus throws exception?




On Mar 20, 2007, at 6:51 PM, John Stiles wrote:

*** Uncaught exception: <NSInternalInconsistencyException> Error (1002) creating CGSWindow

kCGErrorInvalidConnection - 1002 The parameter representing a connection to the window server is invalid.

It looks like the Cocoa aspects of your application don't have a proper connection to the window server. NSImage uses the window server to create a target graphic context when you attempt to draw into it.

Have you tried adding in a call to [NSApplication sharedApplication] someplace in your application initialization? This kicks AppKit to bootstrap itself.

-Shawn
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden
References: 
 >NSImage lockFocus throws exception? (From: John Stiles <email@hidden>)



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.