NEWBIE: Connecting up all those Ms, Vs and Cs
NEWBIE: Connecting up all those Ms, Vs and Cs
- Subject: NEWBIE: Connecting up all those Ms, Vs and Cs
- From: Stephen P Lesniewski <email@hidden>
- Date: Sat, 13 Aug 2005 15:00:12 -0400
Hello All...
I'm a newbie to Cocoa (but not the Mac =) and I making my way
through the Aaron Hillegass's book and I've reached a point (Ch 15)
where I'm stumbling. I really want to use MVC separation at a file
level, but setting up the linkages between them is turning out to be
a bit of a problem for me.
Quick summary of the problem, write a document-based Cocoa app
that allows the user to draw ovals. Add Save/Load and Undo (if
you're feeling ambitious =). I'm (perhaps) cheating a bit and
combining by MC into a subclass of MyDocument. Up til this point
examples/exercises linkages were Target/Action and that clicks with
me, but now I have an mouseUp event that needs to create an "oval" in
the Model/Controller and that's not clicking. I thought I had it
with an IBOutlet in a the StretchView (subclass of NSView) linked
back to "My Document" in IB, but when I started to implement the Save
functionality I found that object that MyDocument was saving was
different than the one StretchView was drawing from.
How should the View be linking up with the Controller? In a perfect
Cocoa App how would you setup linkages between M, V, and C?
tia
-S
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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