Re: Window Controllers Not Linking
Re: Window Controllers Not Linking
- Subject: Re: Window Controllers Not Linking
- From: Fritz Anderson <email@hidden>
- Date: Fri, 14 Oct 2005 18:56:53 -0500
On 14 Oct 2005, at 5:15 PM, Sanford Selznick wrote:
I have a multi-document application created with stationary.
Why won't it move? Oh, _stationery_, as in a project template.
In MyDocument.nib I have:
A MyWindowController instance (inheriting from NSWindowController)
A Window instance (of NSWindow)
I want Cocoa to use MyWindowController for my window from the Nib
instead of creating its own NSWindowController.
How do I convince Cocoa to use the MyWindowController instance
from my Nib instead of creating its own? What's the best place to
do this? If I try to do it in NSDocument:makeWindowControllers,
MyWindowController hasn't been instanced yet. Am I missing some
magic in IB perhaps?
You're fighting the framework. NSWindowControllers are not meant to
be instantiated in a NIB. They are meant to be instantiated in the
application by a controller object, where they will use one of the
init...: methods to load a NIB and make the NSWindowController the
owner of the NIB.
-- F
_______________________________________________
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