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: Mike Abdullah <email@hidden>
- Date: Thu, 17 Aug 2006 17:00:01 +0100
Um, this all seems a little complicated. Just bind the "Enabled" key
of the button to the same key that you are binding the text field to
and use the NSIsNotNil value transformer.
Mike.
On 17 Aug 2006, at 12:16, Chris Suter wrote:
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
<MainMenu.nib.zip>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
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