• 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
(Newbie) How do Multiple NSWindowControllers find MyDocument?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(Newbie) How do Multiple NSWindowControllers find MyDocument?


  • Subject: (Newbie) How do Multiple NSWindowControllers find MyDocument?
  • From: John Velman <email@hidden>
  • Date: Sat, 30 Aug 2008 17:50:17 -0700

My app will have a "master" window with push buttons to open (as needed)
different views on my data.

I understand the multiple nib - multiple window controller arrangement with
override of makeWindowControlers tolerably well (I think).  But..

If I understand "Document-Based Applications Overview" correctly,
MyDocument should handle the data, and should add the new window
controllers as needed, as well as providing the interface to the data.

So, if the button is pushed to bring up a new window, the IBAction is in
the master window controller.  But the actual adding of the
NSWindowController and its associated window should be done by a method
back in MyDocument.

I can't find description of this part of the process.  One way I can think
of to do it is as follows:

In my MasterWindowController, have an instance variable called something
like "createdby", and a method "setCreatedby".  Then in MyDocument, when I
alloc and init the instance of the masterWindowController, I follow
directly with [masterWindowController setCreatedby:self].

Or, is there a more Cocoa-ish way of doing this?

Thanks,

John Velman
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: (Newbie) How do Multiple NSWindowControllers find MyDocument?
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: NSTableView "sometimes" doesn't repaint on reloadData:?
  • Next by Date: Re: (Newbie) How do Multiple NSWindowControllers find MyDocument?
  • Previous by thread: Re: NSTableView "sometimes" doesn't repaint on reloadData:?
  • Next by thread: Re: (Newbie) How do Multiple NSWindowControllers find MyDocument?
  • Index(es):
    • Date
    • Thread