Re: NSMatrix / NSArrayController bindings
Re: NSMatrix / NSArrayController bindings
- Subject: Re: NSMatrix / NSArrayController bindings
- From: "Angela Brett" <email@hidden>
- Date: Thu, 28 Oct 2004 22:05:09 +1300 (NZDT)
- Importance: High
>
I have worked with several cell types in a bound
>
matrix, none were very problematic.
Since you're experienced with binding NSMatrices, have you ever managed to
get a binding working when the NSMatrix is in Track mode? I've got mine
working, but only if I set the mode to something else in IB and later set
it to track mode programmatically. However, since an NSMatrix set to track
mode in IB is not KVC-compliant for the key 'content', I shouldn't rely on
the fact that the same NSMatrix set to track mode in code is KVC-compliant
for that key. I guess this must be a class cluster thing, where I get a
non-KVC-compliant subclass of NSMatrix if it knows it's in track mode at
the time it's created. I'll probably get rid of the bindings and handle
the matrices manually because of that uncertainty. It would be nice if
that quirk were documented somewhere, with a reason why track mode doesn't
always support that binding.
Just in case I stick with the NSArrayController, does anyone know how to
bind to the textColor of the NSTextFieldCells in the matrix? I can see how
to bind the controller to the matrix, or bind something to the textColor
of a particular cell in IB, but I can't work out how to get the
NSArrayController controlling properties of the cells. I want it so that
each element in the array has a 'colour' key, the value of which
determines the textColor of the cell it's displayed in. Sorry if that's a
bit of a newbie question, I've only got into bindings recently -- maybe I
should go watch some of the WWDC2003 sessions on it.
Angela Brett
email@hidden
http://NSCoder.com
_______________________________________________
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