• 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: Bind button avail to edit field content
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Bind button avail to edit field content
      • From: Mike Abdullah <email@hidden>
References: 
 >Bind button avail to edit field content (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: Bind button avail to edit field content
  • Next by Date: Re: Custom Cell not working in NSTableView
  • Previous by thread: Re: Bind button avail to edit field content
  • Next by thread: Re: Bind button avail to edit field content
  • Index(es):
    • Date
    • Thread