Re: NSWindowController showWindow not working from plugin
Re: NSWindowController showWindow not working from plugin
- Subject: Re: NSWindowController showWindow not working from plugin
- From: Ken Tozier <email@hidden>
- Date: Tue, 16 May 2006 05:46:33 -0400
Never mind. I Googled a bit and found the NSApplicationLoad() command
which solves the problem.
Ken
On May 16, 2006, at 5:12 AM, Ken Tozier wrote:
Hi
I'm writing a Quark 6.5 XTension and due to some rather convoluted
problems I ended up having to write a CFPlugin for the XTension. I
can get the Quark XTension to load my plugin and it calls the
plugin methods OK but when I initialize a window controller using:
paletteController = [[NSWindowController alloc]
initWithWindowNibPath: nibPath owner: self];
It loads OK as evidenced by NSLog(paletteController) but calling
[paletteController window] doesn't display the window and an NSLog
(paletteController window]) displays null. I know the palette is
wired correctly to the file's owner in InterfaceBuilder because
loading the exact same nib from an application works.
I don't want the palette to display on load but just to see if it
would make a difference, I checked the "Visible at launch time"
checkbox in the palettes attributes pane. Now when Quark launches,
it proceeds up to the [NSWindowController alloc]
initWithWindowNibPath: nibPath owner: self] call and crashes with
the error:
*** Uncaught exception: <NSInternalInconsistencyException> Error
(1002) creating CGSWindow
Here's the crash log snippet:
Thread 0 Crashed:
0 com.apple.Foundation 0x92902340 _NSRaiseError + 264
1 com.apple.AppKit 0x936c8380 -[NSWindow
_commonAwake] + 1248
2 com.apple.AppKit 0x936cba54 -[NSWindow
_reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]
+ 512
3 com.apple.AppKit 0x936a710c -[NSIBObjectData
nibInstantiateWithOwner:topLevelObjects:] + 988
4 com.apple.AppKit 0x936932bc loadNib + 240
5 com.apple.AppKit 0x93692d14 +[NSBundle
(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 716
6 com.apple.AppKit 0x936ea1e4 +[NSBundle
(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 156
7 com.apple.AppKit 0x9377db9c -[NSWindowController
loadWindow] + 204
8 com.apple.AppKit 0x9377d8c0 -[NSWindowController
window] + 92
Could the fact that the plugin is twice removed frrom the main
Quark application mean that the it might need to create it's own
run loop?
Any insights appreciated.
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40comcast.net
This email sent to email@hidden
_______________________________________________
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