• 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
Re: MVC....brief question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MVC....brief question


  • Subject: Re: MVC....brief question
  • From: Michael de Haan <email@hidden>
  • Date: Tue, 7 Jul 2009 07:23:47 -0700


On Jul 7, 2009, at 7:16 AM, Keary Suska wrote:

On Jul 7, 2009, at 6:31 AM, Michael de Haan wrote:

+ (NSSet *)keyPathsForValuesAffectingBmi  /* "bmi" is model Ivar */
{
	return [ NSSet setWithObjects:@"weight", @"height", nil];
}


My question. I included the above method in the model, as this is the only place available. I just wonder if this is correct?

The only appropriate location for the method is the object that has all of the referenced properties.

Of course! :-)


(in a sense it "enables" the getter "bmi". )

Not in any sense, really. It simply tells all observers of "bmi" that "bmi" has changed every time "weight" or "height" changes.



Beginning to really appreciated the "beauty" of cocoa...but it's a steep learning curve!!




Thanks again for clarifying.

Michael.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >MVC....brief question (From: Michael de Haan <email@hidden>)
 >Re: MVC....brief question (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: MVC....brief question
  • Next by Date: Display the elements of array in a tablview ?
  • Previous by thread: Re: MVC....brief question
  • Next by thread: Display the elements of array in a tablview ?
  • Index(es):
    • Date
    • Thread