Re: adding something to a setter
Re: adding something to a setter
- Subject: Re: adding something to a setter
- From: Torsten Curdt <email@hidden>
- Date: Thu, 06 Oct 2011 15:54:26 +0200
Well, if the model is more complex and you bind the view to the model
you can of course trigger the re-display on the observed changes. But
what about a simple title property of e.g. a NSButton?
...and I guess triggering a re-display is not the only use case for
this "setter extension" - or whatever you want to call it.
cheers,
Torsten
On Thu, Oct 6, 2011 at 3:32 PM, Peter <email@hidden> wrote:
> But probably that bad feeling is self-inflicted ...
>
> At least for standard views or controls, if there is a need to redisplay, the property in question should probably belong to a model object not a view object. And in that case your object would not observe its *own* property but a property of the model object - and this observation then would trigger a display refresh. MVC+KVO.
>
> I hope I am not too wide off the mark.
>
> Am 06.10.2011 um 15:23 schrieb Thomas Davie:
>
>>
>> On 6 Oct 2011, at 14:16, Torsten Curdt wrote:
>>
>>> Hm... using KVO for an object to observe it's own properties?
>>> That's feels wrong to me.
>>> Is that just me?
>>
>> No, definitely not just you... But then, I find KVO pretty wrong in the first place.
>>
>> if (*ra4 != 0xffc78948) { return false; }
>>
>> _______________________________________________
>>
>> 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
>>
>
> _______________________________________________
>
> 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
>
_______________________________________________
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