Re: Connect NSView to NSDocument
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