Initializing views with models
Initializing views with models
- Subject: Initializing views with models
- From: Edwin Vane <email@hidden>
- Date: Tue, 26 Jul 2005 13:53:40 -0400
- Mail-followup-to: Cocoa-Dev <email@hidden>
Hi,
I'm new to Cocoa and I'm working on wrapping my head around how objects
communicate in the framework. I'm looking for the 'Cocoa way' for the
following problem:
I have an NSWindow filled with custom and standard NSView-derived
objects and controls. From what I understand of the MVC pattern, these
things make up the View. What I'd like to happen is to make a window
appear but before it appears to initialize the internal views with links to particular
model objects (taken from a document perhaps although for now I've just
hardcoded one set of model objects).
So which object should provide the view with links to the model? The
window resides in a nib file and is not visible by default. Right now I
have a subclassed NSWindowController that will make the window visible
in response to some action. Should the WindowController do the
view->model linking (before the window is made visible) or should something else?
--
Edwin Vane
MMath Candidate
Computer Graphics Lab
School of Computer Science
University of Waterloo
_______________________________________________
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