Re: Enumerating outlets automatically?
Re: Enumerating outlets automatically?
- Subject: Re: Enumerating outlets automatically?
- From: Graham Cox <email@hidden>
- Date: Thu, 6 Nov 2008 18:13:42 +1100
On 6 Nov 2008, at 4:26 pm, David Duncan wrote:
If the 'enabled' state of all these objects are effectively tied to
a particular state, then why not use bindings? You could bind the
enabled state of these controls to a property of your controller
object and then you just set the property and voila.
I had a feeling I might get that answer ;-)
Thing here is, this code is something like a sort of 'poor man's
bindings', in that the values of the controls pretty much look after
themselves via KVO and a tiny bit of generic glue code. Moving to
actual bindings is a goal but right now that's a big amount of rework
of code that does work well as is. It's only the enable state of
controls that ends up needing to be manhandled in this way. I can live
with it, but just wondered if I could figure out a way to automate it
somewhat.
Thanks for the suggestion though, I do think it's probably the way to
go ultimately.
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