Hello.

I'm reading COCOA Design Patterns from Eric M. Buck & Donald A. Yacktman.
and i'm having a hard time applying the principle in my architecture.

for example, if i create a new document based application in XCode, the 
MyDocument xib file 
binds the window outlet to the MyDocument Class.

From what I read the MyDocument Class is supposed to be a model controller, not 
the window controller.
The MyDocument Class is supposed to be able to host an array of window 
controllers.
I see that makes sense if I have a main data view window and I would want to 
associate an inspector 
to that window and share the same data source with both windows. and I like 
that idea.
 
what i am unsure of is how to go about with interface builder, and where should 
i associate the view with it's controller
inside the MyDocument Class? ( but i read that model should have no knowledge 
of the view)
is it the same for the Model Controller? 

if it's not then MyDocument Class becomes more than a Model Controller it is 
also a Window controller.
in witch case why bother creating separate View/Window controllers?
and why host an array of window controllers?

Do i create the Window controllers in IB or do i do it in code, and how would i 
go about doing that the right way?

I'm kind of confused and I'd really love some clearing up.

thanks for any pointers.
Sandro Noel._______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to