Re: Binding a text field's editable binding to a matrix
Re: Binding a text field's editable binding to a matrix
- Subject: Re: Binding a text field's editable binding to a matrix
- From: Keith Renz <email@hidden>
- Date: Wed, 19 Jan 2005 10:40:46 -0500
I have a matrix of 3 radio buttons. Selecting one of the radio
buttons totals some data within a date range. There are 2 text fields
associated this radio button for setting the date range. When this
radio button is not selected, I want the 2 text fields to be
disabled. Likewise, when this radio button is selected, I want the 2
text fields to be enabled. The matrix is bound to a document iVar (a
dictionary) with an object controller. The two text fields are also
bound to the same document iVar with the same object controller. Is
there a straight forward way to bind the 2 text field's "editable"
bindings to the matrix of radio buttons?
No. You need to bind the 'enabled' binding to an attribute of a
controller. Do you have a binding for the radio button selection in a
controller? You should bind the text field's 'enabled' binding to the
same thing.
mmalc,
First, I'd like to thank you for helping me out with this because this
is a confusing issue for me. Second, I made a mistake in my initial
post. I meant to ask, is there a straight forward way to bind the 2
text field's "enabled" bindings to the matrix, not "editable" -- I
understand the difference. :)
To answer your question, yes, my 3 radio button matrix's
'selectedIndex' binding is bound to a document's iVar (dictionary) with
an object controller -- works fine. But, the selectedIndex's value (and
the bound to document's iVar) has values of 0, 1 & 2, as it should be
since it's a 3 button matrix.
If I bind the text field's 'enabled' binding to this same object, it
will be disabled for a value of 0 and enabled for values of 1 and 2 --
it's a BOOL --, which is not the behavior I want. I want the text
fields to be enabled only for one selected index, in this case the 3rd
radio button, index 2. So, maybe my initial question should have been
more precise. It is not obvious to me what needs to be done here.
Thanks,
Keith
_______________________________________________
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