Re: Dumb Button binding Question
Re: Dumb Button binding Question
- Subject: Re: Dumb Button binding Question
- From: Felix Franz <email@hidden>
- Date: Thu, 9 Mar 2006 17:54:54 +0100
On Mar 9, 2006, at 4:47 PM, Matt Gough wrote:
I have a panel window with a text field, a cancel button and an OK
button.
Is it possible to bind the enabled state of the OK button to
whether the text field is not empty?
You could write a NSValueTransformer which transforms a NSString to a
BOOL
(returning NO if the string is empty, YES otherwise) and bind the
'enabled'-binding
to the string bound to the text field using this transformer.
But maybe there is a simpler solution?
Cheers,
felix
_______________________________________________
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