• 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: Regarding MVC design pattern
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regarding MVC design pattern


  • Subject: Re: Regarding MVC design pattern
  • From: Barry Skidmore <email@hidden>
  • Date: Thu, 20 May 2010 09:50:01 -0500

Ah I see. Not that I am aware of, in fact if you require a set property in your object then init is the best place for it to be.

Sent from my iPhone

On May 20, 2010, at 9:47 AM, Thomas Davie <email@hidden> wrote:


On 20 May 2010, at 15:45, Barry Skidmore wrote:

If you need to have it set you should create an initWithOptionName: and call that from your standard init, or return an error stating a missing value is needed.

Your init should always call down tithe most specific init.

Specific examples of this are available as best practice in several cocoa and design pattern books.

I think you've misunderstood what I was asking.

If I use a setter (in the most specific init), then I don't need to recode (even the most specific init) if I change how the property is implemented.

If I don't use the setter, I do.

What I was asking was why you would want to avoid using setters in the init method... Is there some safety issue I've missed?

Bob
_______________________________________________

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: 
 >Regarding MVC design pattern (From: Sai <email@hidden>)
 >Re: Regarding MVC design pattern (From: Henry McGilton <email@hidden>)
 >Re: Regarding MVC design pattern (From: Sai <email@hidden>)
 >Re: Regarding MVC design pattern (From: Jack Nutting <email@hidden>)
 >Re: Regarding MVC design pattern (From: Sai <email@hidden>)
 >Re: Regarding MVC design pattern (From: Kyle Sluder <email@hidden>)
 >Re: Regarding MVC design pattern (From: Sai <email@hidden>)
 >Re: Regarding MVC design pattern (From: Jack Nutting <email@hidden>)
 >Re: Regarding MVC design pattern (From: Joanna Carter <email@hidden>)
 >Re: Regarding MVC design pattern (From: Sherm Pendley <email@hidden>)
 >Re: Regarding MVC design pattern (From: mmalc Crawford <email@hidden>)
 >Re: Regarding MVC design pattern (From: Thomas Davie <email@hidden>)
 >Re: Regarding MVC design pattern (From: Barry Skidmore <email@hidden>)
 >Re: Regarding MVC design pattern (From: Thomas Davie <email@hidden>)

  • Prev by Date: Re: Regarding MVC design pattern
  • Next by Date: Re: Simulating Text Input
  • Previous by thread: Re: Regarding MVC design pattern
  • Next by thread: Re: Regarding MVC design pattern
  • Index(es):
    • Date
    • Thread