• 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: Connect NSView to NSDocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Connect NSView to NSDocument


  • Subject: Re: Connect NSView to NSDocument
  • From: Frédéric Testuz <email@hidden>
  • Date: Sun, 5 Mar 2006 17:25:36 +0100

Le 4 mars 06 à 22:38, Jason Barker a écrit :

Newbie issue:

I have a Cocoa Document-based Application project with a MyDocument class and a subclass of NSView in my MyDocument.nib. I have some objects in my MyDocument class that I would like my subclass of NSView to be able to access. How can I do this? Do I have to set up a connection between these objects in Interface Builder or through Xcode?

In your NSView methods :

[[[self window] windowController] document]

It must works without problem if your project is from the Cocoa- Document project template. If you have a document with more than one window, you must have add your windows to the document with the NSDocument method addWindowController:

Frédéric _______________________________________________
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: 
 >Connect NSView to NSDocument (From: Jason Barker <email@hidden>)

  • Prev by Date: Using a custom NSCell for NSButton created in IB
  • Next by Date: [SOLVED]Re: was(Mail.app)iWeb.app like SplitView Handle
  • Previous by thread: Re: Connect NSView to NSDocument
  • Next by thread: Help with custom NSCell and Bindings in Table View
  • Index(es):
    • Date
    • Thread