• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dumb Button binding Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Dumb Button binding Question
      • From: Volker Runkel <email@hidden>
References: 
 >Dumb Button binding Question (From: Matt Gough <email@hidden>)

  • Prev by Date: NewMovieFromProperties - crashes.
  • Next by Date: Re: Dumb Button binding Question
  • Previous by thread: Dumb Button binding Question
  • Next by thread: Re: Dumb Button binding Question
  • Index(es):
    • Date
    • Thread