• 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
windowControllerDidLoadNib problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

windowControllerDidLoadNib problem


  • Subject: windowControllerDidLoadNib problem
  • From: Tom Gray <email@hidden>
  • Date: Sun, 08 Sep 2002 15:19:13 -0400

Howdy, and as always, thanks in advance.

my NSDocument's windowControllerDidLoadNib method is not being called after
the my NSWindowController (custom class) nib file has been loaded.

I have a NSDocument class and a NSWindowController class. The
NSWindowController class is loading a nib file (I have confirmed it loaded).
It is my understanding that my NSDocument class will run the
windowControllerDidLoadNib method once the nib file is unloaded.

I have added the NSWindowController via the makeWindowController method.

I am attempting to do nothing more then use the document/window controller
method to save a rtf string to disk and reload it. If anyone has a simple
example code snippet of this I would appreciate it. My problem has been that
the textView containing the string is part of the nib file owned by the
window controller. The document needs to know about this when
loading/saving. So, it seems to me I had to subclass the window controller
to return the textView from which I get access to the rtf string in the
textView.

However, I can't access the window controller and its nib file till after it
has been loaded! Hence my problem.

This all seems a little circular. There probably is a better way to do this.
All the examples of simple file saving and loading I have seen only use a
document class (the nib file belongs to the document and they don't use a
controller class). Anyone have a simple NSDocument, NSWindowController, nib
file example?


--

Tom Gray
email@hidden
or
email@hidden
_______________________________________________
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: windowControllerDidLoadNib problem
      • From: Andreas Mayer <email@hidden>
  • Prev by Date: Controlling number of bounces of app icon at launch
  • Next by Date: Outlineview byitem.. what is "item" ?
  • Previous by thread: Controlling number of bounces of app icon at launch
  • Next by thread: Re: windowControllerDidLoadNib problem
  • Index(es):
    • Date
    • Thread