• 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: Grief with NSDocument windowControllerDidLoadNib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grief with NSDocument windowControllerDidLoadNib


  • Subject: Re: Grief with NSDocument windowControllerDidLoadNib
  • From: Brian Webster <email@hidden>
  • Date: Wed, 27 Mar 2002 14:07:01 -0600

On Wednesday, March 27, 2002, at 12:46 PM, cocoa-dev-
email@hidden wrote:

The problem I have in [5] is that there is a time delay between stages
[2] and [5], so when the document is ready to pass the NSImage over to
the window controller, the window controller hasn't yet loaded the nib
file or hooked anything (including the NSImageView) up. It seems the
document's windowControllerDidLoadNib is the correct place to put the
'delayed' handshaking code, but my document's windowControllerDidLoadNib
isn't getting called. And it's just not fair.

It'd be fair as long as it was clearly documented. Actually, it is documented, it's just not the easiest thing to find. In the "Document Based Applications" programming topic, looking under the FAQ section reveals this:

--------------------------------------------------------------

How can I do extra UI hookup or preparation before or after my nib file loads?


In many applications, you need to perform set up operations right before or after a document's user interface loads.

If you do not subclass NSWindowController then you can override NSDocument's windowControllerWillLoadNib: or windowControllerDidLoadNib: methods to do any extra setup you need to do.

If you do subclass NSWindowController you should instead override NSWindowController's windowWillLoad and windowDidLoad methods.

------------------------------------------------------------------

So, just implement windowDidLoad in your window controller and you should be able to do what you want from there.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Grief with NSDocument windowControllerDidLoadNib
      • From: Ken Tabb <email@hidden>
  • Prev by Date: programmatic next key ordering ?
  • Next by Date: Re: Pixmaps
  • Previous by thread: Grief with NSDocument windowControllerDidLoadNib
  • Next by thread: Re: Grief with NSDocument windowControllerDidLoadNib
  • Index(es):
    • Date
    • Thread