<NSInternalConsistencyException> Error (1002) creating CGSWindow
<NSInternalConsistencyException> Error (1002) creating CGSWindow
- Subject: <NSInternalConsistencyException> Error (1002) creating CGSWindow
- From: "Nathan Herring" <email@hidden>
- Date: Wed, 21 Jun 2006 22:53:42 -0700
- Thread-topic: <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