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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to