• 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
references to controllers in document based applications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

references to controllers in document based applications


  • Subject: references to controllers in document based applications
  • From: Torsten Curdt <email@hidden>
  • Date: Sat, 9 Feb 2008 22:46:35 +0100

Hey there,

How this started: I have a document based application and when I click on a button in the document window I want to close the document. AFAICS just calling close from within the NSDocument is not enough ...probably the NSDocumentController needs to initiate the close IIUC. As of now I have no clue how to obtain a reference to that controller to call initiate the close. All I could think of is subclassing the NSDocumentController and connect the button to a method in there.

I also have an AppController class that I need to reference from my documents. So this brought up a more general question. As the document handling is encapsulated inside the NSDocumentController - how do people usually do this? ...getting access to those instances that are created and controlled by the framework.

Any pointers to an open source app where I could have a look how this is done?

I was scanning through http://developer.apple.com/documentation/Cocoa/ Conceptual/Documents/Documents.html#//apple_ref/doc/uid/10000006 but did not see this covered ...or did I miss it? I would have expected the NSDocument to have a reference back to the controller.

cheers
--
Torsten
_______________________________________________

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: references to controllers in document based applications
      • From: Michael Babin <email@hidden>
    • Re: references to controllers in document based applications
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: Re: What's the replacement for GetMBarHeight?
  • Next by Date: Re: references to controllers in document based applications
  • Previous by thread: Toolbar Customize and NSOpenPanel crashing
  • Next by thread: Re: references to controllers in document based applications
  • Index(es):
    • Date
    • Thread