NSButtonCell columns in NSOutlineView
NSButtonCell columns in NSOutlineView
- Subject: NSButtonCell columns in NSOutlineView
- From: Marcus Roberts <email@hidden>
- Date: Mon, 15 Aug 2005 08:43:24 +0100
Hello all,
I'm trying to use a column of NSButtonCells in an NSOutlineView.
Using XCode 2.1, I can drag an NSButtonCell onto the column in IB, and
the column changes type. I can then bind my NSTreeController to that
column, and have the selected state of the button changed in the data,
by binding to
arrangedObjects.selected (where selected is a value in my class)
(The binding is in Object rather than Entity mode)
This works perfectly.
However, to make the outline view look better, rather than a column of
text and a column of checkboxes, I'd like to have a single column. I
think I can do this by binding the selected key to the value binding
of the buttoncell, and the text to the title binding of the button
cell. If I click the small triangle in the column header, it switches
over to a set of bindings that include these two bindings.
The problem is I can't bind the same values here as I can in the
normal bindings - an error is returned that an NSControllerTreeProxy
object is not key value coding-compliant for the key selected.
I only discovered the action of the little triangle by chance on
Google. Could anyone explain what it's supposed to do, or have any
suggestions as to why the bindings work differently here.
Thanks
Marcus
_______________________________________________
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