Re: Bind button avail to edit field content
Re: Bind button avail to edit field content
- Subject: Re: Bind button avail to edit field content
- From: Chris Suter <email@hidden>
- Date: Thu, 17 Aug 2006 21:16:00 +1000
On 17/08/2006, at 6:47 PM, Trygve Inda wrote:
Is there a way to bind a buttons enable status to an edit field
such that if
the field is empty, the button is disabled, but if it has any
content the
button is enabled?
It's possible. One way that works (and someone with more bindings
experience can probably offer a more elegant solution) is to
instantiate an NSMutableDictionary and an NSObjectController in your
NIB file. Then bind your edit control to a key in your dictionary via
the object controller and then you'll be able to bind the enabled
setting for the button. I'm not sure whether it's a good idea to do
it this way.
- Chris
Attachment:
MainMenu.nib.zip
Description: Zip archive
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden