Re: Cocoa Bindings, NSMatrix, setting programmatically
Re: Cocoa Bindings, NSMatrix, setting programmatically
- Subject: Re: Cocoa Bindings, NSMatrix, setting programmatically
- From: Scott Anguish <email@hidden>
- Date: Wed, 28 Apr 2004 04:47:13 -0400
On Apr 27, 2004, at 10:27 PM, Renaud Boisjoly wrote:
>
Hi all!
>
>
I have an NSMatric bound to an array of strings. The values of the
>
NSButtonCells are entered directly in Interface Builder.
>
>
Everything works, the Bindings keep the selection in the NSMatrix. My
>
issue is to set a value for the selection programmatically.
>
>
For example. My class is called "RBThings" which has a property called
>
"weekdays" (NSMutableArray) and the table which contains the weekday
>
names is bound to this using an NSArrayController. But I wish to set
>
the value in the weekdays of this object initially in its init method
>
(or elsewhere if there is a better way).
how do the items in the array relate to the items in the matrix?
the array contains strings? which of the selected* bindings are you
using to get the value back? You should only need to set the value of
the variable bound to that binding.
can you explain what is in the array, and the bindings you've created?
>
>
I have a feeling that what is stored for the binding is the actual
>
object (NSCell?) in the Matrix which is selected. What I collect in
>
the array seems to be the string though... but if I programmatically
>
set the value of the weekdays property to "Monday", the interface
>
doesn't reflect this.
>
>
What is the proper way to set the value of a bound property
>
programmatically?
>
>
I hope my description is clear enough...
>
>
thanks for any help!
>
>
- Renaud
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.