Re: Extending KVO to scalar struct types?
Re: Extending KVO to scalar struct types?
- Subject: Re: Extending KVO to scalar struct types?
- From: Graham Cox <email@hidden>
- Date: Fri, 29 Aug 2014 18:32:59 +1000
On 29 Aug 2014, at 3:56 pm, Graham Cox <email@hidden> wrote:
> You might wonder if I already know the type why this is even useful.
Having given this a lot more thought, I think it's simpler just to break down the compound properties into singular ones on the target object. These can be derived from the compound ones and using +keyPathsForValuesAffecting<Key>, it's easy to trigger notifications off of these derived properties. Since I only have a few of these compound properties, it's not too much work to add derived singular properties and design my UI controller around those.
I think the takeaway from the exercise for me is don't use properties returning points, sizes or rects if you want to eventually hook these up to a UI.
--Graham
_______________________________________________
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