Re: Binding an objects "Enabled" to a button in IB
Re: Binding an objects "Enabled" to a button in IB
- Subject: Re: Binding an objects "Enabled" to a button in IB
- From: Markus Müller <email@hidden>
- Date: Mon, 06 Sep 2010 10:46:19 +0200
Just use an additional NSObjectController. Its default content is a
NSMutableDictionary, add a key here, say lockUI, switch "automatically
prepares content" to yes and bind your form fields enabled binding to
that controllers lockUI-property (should show up in IB).
That is a completly valid and MVC-comforming technique, you are reusing
existing classes and don´t need any gluecode (as in coding your state
property in the controller).
Best regards, Markus
Am 30.08.10 14:26, schrieb email@hidden:
Can the following be done completely in the nib file (in IB)?
I have a form field whos fields are bound to various attributes of an
object (the object Person has attributes as firstName, lastName, etc.). In
my view I would like lock these fields, prohibiting them from being
changed, i.e. I'd like to be able to toggle the forms' "Enabled"-binding
between YES and NO. For this I'd like to use a simple button named "Lock".
Can this binding be done in IB or do I need to add this functionality
programatically?
_______________________________________________
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