Re: Regarding MVC design pattern
Re: Regarding MVC design pattern
- Subject: Re: Regarding MVC design pattern
- From: mmalc Crawford <email@hidden>
- Date: Thu, 20 May 2010 07:24:34 -0700
On May 19, 2010, at 4:38 am, Sherm Pendley wrote:
> If you set the ivars directly, as above, the synthesized setters will
> NOT be called. For that to happen, you need to use dot-syntax, like
> this:
>
> - (void) dealloc {
> self.beginButton = nil;
> self.endButton = nil;
> // etc...
> [super dealloc];
> }
>
You do not *need* to use the dot syntax to invoke the accessors synthesised for a property. You can also use the corresponding accessor method using [] syntax, e.g.
[self setBeginButton:nil];
However, you should typically not invoke accessor methods in init or dealloc methods.
mmalc
_______________________________________________
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