• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSImage lockFocus throws exception?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage lockFocus throws exception?


  • Subject: Re: NSImage lockFocus throws exception?
  • From: Shawn Erickson <email@hidden>
  • Date: Tue, 20 Mar 2007 19:35:13 -0700


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:
This email sent to email@hidden


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

  • Prev by Date: Re: NSImage lockFocus throws exception?
  • Next by Date: Weird (fatal) CoreData caching behavior
  • Previous by thread: Re: NSImage lockFocus throws exception?
  • Next by thread: setFrameUsingName and (auto resizing) palette windows
  • Index(es):
    • Date
    • Thread