• 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: Window Controllers Not Linking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Window Controllers Not Linking (From: Sanford Selznick <email@hidden>)

  • Prev by Date: Re: CoreData - KVO on unarchived array/dictionary elements?
  • Next by Date: Re: Bindings do not work in threads?
  • Previous by thread: Window Controllers Not Linking
  • Next by thread: How to create an indexed color PNG file
  • Index(es):
    • Date
    • Thread