• 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: <NSInternalConsistencyException> Error (1002) creating CGSWindow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: <NSInternalConsistencyException> Error (1002) creating CGSWindow


  • Subject: RE: <NSInternalConsistencyException> Error (1002) creating CGSWindow
  • From: "Nathan Herring" <email@hidden>
  • Date: Wed, 21 Jun 2006 23:08:13 -0700
  • Thread-topic: <NSInternalConsistencyException> Error (1002) creating CGSWindow

So much for a good impression.

My searching through old posts on the newsgroups hadn't gotten me far, so I wrote the previous e-mail, and then the next post I read (http://lists.apple.com/archives/cocoa-dev/2006/May/msg01056.html) addressed the problem (call NSApplicationLoad). :/

Unfortunately, now I'm stuck on how to get a modal-ly run-loop started...

-nh

-----Original Message-----
From: cocoa-dev-bounces+nathanh=email@hidden [mailto:cocoa-dev-bounces+nathanh=email@hidden] On Behalf Of Nathan Herring
Sent: Wednesday, June 21, 2006 10:54 PM
To: email@hidden
Subject: <NSInternalConsistencyException> Error (1002) creating CGSWindow

I am a complete newbie wrt Cocoa, so bear with me if this is obvious.

I am trying to create a Cocoa framework that hosts a modal dialog window (and maybe later a menu). The idea is to be able to call an API either from a Cocoa application or from a Carbon application and have it go through its work and return.

I've created a simple stub Cocoa application that consists entirely of a single call to the API so I can test how all this is working (or not as the case might be).

The framework has the API, which creates an NSAutoreleasePool, allocs/inits a sub-class of NSWindowController and tells it to showWindow (and then releases the pool and returns, for lack of code written yet). The sub-class of NSWindowController, which was marked as the FileOwner class in the related .nib, calls [super initWithWindowNibName:@"nameofnib"] in its init method. The .nib lives in the Framework. The sub-class of NSWindowController (via the FileOwner) has all of its outlets and actions wired.

If I just run this code directly, I get an uncaught exception under showWindow, "<NSInternalConsistencyException> Error (1002) creating CGSWindow".

Most of what I'm doing is extrapolating from bits in the first edition of _Cocoa Programming for Mac OS X_. However, I don't quite know exactly what goes on under the covers when NSApplicationMain is called s.t. I know what to do in the framework - for a regular Cocoa app, NSApplicationMain may already have been called, but for a Carbon application, it's probably not, nor am I sure it's the right thing to call either. I'm also not sure whether that has anything to do with the error I'm facing.

Pointers? Or is more information necessary?

Thanks in advance,
nh
----
Nathan Herring
MacBU SDE/Development

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 ><NSInternalConsistencyException> Error (1002) creating CGSWindow (From: "Nathan Herring" <email@hidden>)

  • Prev by Date: <NSInternalConsistencyException> Error (1002) creating CGSWindow
  • Next by Date: Re: How to add menu to menu bar
  • Previous by thread: <NSInternalConsistencyException> Error (1002) creating CGSWindow
  • Next by thread: NSNib's initWithContentsOfURL: is not initializing when nib file is in another system
  • Index(es):
    • Date
    • Thread