• 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: NSTextField & Hidden Binding Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField & Hidden Binding Problem


  • Subject: Re: NSTextField & Hidden Binding Problem
  • From: Thaddeus Cooper <email@hidden>
  • Date: Thu, 16 Nov 2006 12:28:34 -0800

Matt --

That's kind of what I thought -- however, that doesn't really get to the heart of the problem. The bindings for the two TextFields look like this:

Label
-------
enabled
	Bind to: TestWizard_AppDelegate
	Model Key Path: customSMTPServerSelected

hidden
	Bind to: TestWizard_AppDelegate
	Model Key Path: customSMTPServerSelected
	Value Transformer: NSNegateBoolean

Data Entry Field
----------------------
value
	Bind to: SMTPServers Array Controller
	Controller key: selection
	Model Key Path: password

enabled
	Bind to: TestWizard_AppDelegate
	Model Key Path: customSMTPServerSelected

hidden
	Bind to: TestWizard_AppDelegate
	Model Key Path: customSMTPServerSelected
	Value Transformer: NSNegateBoolean

As you can see, the bindings are effectively identical, and yet the label TextField never becomes visible. Which like you I find very confusing.

If you want to see the actual problem in action the code is available at: <http://labs.nomoreboxes.com/source-code/TestWizard.zip>.

Thanks again for all the help.

Thaddeus O. Cooper
(email@hidden)



On Nov 16, 2006, at 7:17 AM, Matt Neuburg wrote:

On Wed, 15 Nov 2006 16:37:22 -0800, Thaddeus Cooper
<email@hidden> said:
Hi All --

I have an NSTextField in a tab view that is the "label" ("Password:")
for a NSTextField that the user can type in. I only want these two
text fields to be visible when a certain object is selected in the
array controller. I bound the hidden binding of both of them to a
method in the app delegate customSMTPServerSelected. The text field
that the user can type in appears and disappears appropriately, but
the "label" is always visible -- which is not the behavior I want.

What do I need to do to make the "label" become hidden when the
selected object in the array controller changes?

There isn't any reason why the two NSTextFields would behave differently, so
one of them must be incorrectly bound. m.


--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>




_______________________________________________ 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: NSTextField & Hidden Binding Problem
      • From: Matt Neuburg <email@hidden>
References: 
 >Re: NSTextField & Hidden Binding Problem (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Re: New bindings for NSArrayController
  • Next by Date: Reusing HTTP connections
  • Previous by thread: Re: NSTextField & Hidden Binding Problem
  • Next by thread: Re: NSTextField & Hidden Binding Problem
  • Index(es):
    • Date
    • Thread