• 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
NEWBIE: Connecting up all those Ms, Vs and Cs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NEWBIE: Connecting up all those Ms, Vs and Cs
      • From: Damien Sorresso <email@hidden>
    • Re: NEWBIE: Connecting up all those Ms, Vs and Cs
      • From: Vineet Bhatia <email@hidden>
  • Prev by Date: Re: Screen snapshot example code posted
  • Next by Date: Re: What is an NSNextStepFrame?
  • Previous by thread: Re: What is an NSNextStepFrame?
  • Next by thread: Re: NEWBIE: Connecting up all those Ms, Vs and Cs
  • Index(es):
    • Date
    • Thread