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
NSCell subclass with custom binding
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
NSCell subclass with custom binding
Subject
:
NSCell subclass with custom binding
From: Stephan Cleaves <
email@hidden
>
Date: Sat, 21 Oct 2006 11:40:20 -0400
Hi all,
I've used bindings a great deal including custom classes that expose their own bindings but this is the first time I've tried to expose a custom binding for an NSActionCell subclass that would work in an NSTableView. Here is the situation:
NSActionCell subclass exposes a custom binding and implements the necessary methods for binds and observation of changes.
NSTableView with two columns, the first column's value is bound to an NSArrayController backed by an NSMutableArray with Controller Key arrangedObjects and Model Key Path name. That works fine of course. The second column has my NSActionCell set as it's dataCell. This is where the difficultly begins.
Since the binding is custom the NSTableColumn cannot be bound to it because of course it knows nothing about it. I'm not sure if there is a way to get NSTableColumns to know about new bindings programmatically. There is also no point in binding the NSActionCell subclass itself because it only wants a single value and binding to arrangedObjects.bindingname of the NSArrayController would result in an array. I don't know exactly what NSTableColumn does to correctly provide the NSCell with its value but it seems like it probably gets the value via the binding and iterates over the values for the visible cells.
Anyway, my questions are: Is there a way to get NSTableColumn to know about custom bindings either programmatically or through IB? Or, is there some way to establish the binding with the NSActionCell that would work?
I know mmalc has pointed to his ClockControl example but the custom binding for that is in the NSControl subclass and it doesn't seem like I should need an NSControl if I am only interested in an NSActionCell that can be placed in a table. His ReadMe also says " Note that establishing a binding is tricky. You must ensure that the correct binder is used. This is most easily achieved if you establish the binding programatically." about using the clock control in a table view. That is a bit cryptic to me.
Thanks for any help,
Stephan Cleaves
_______________________________________________
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: NSCell subclass with custom binding
From:
Scott Stevenson <email@hidden>
Prev by Date:
Re: (SOLVED) Is it possible to handle a mouse click in an NSTextView without subclassing it?
Next by Date:
making small pdfs
Previous by thread:
Re: outlets to multiple views (NSView)
Next by thread:
Re: NSCell subclass with custom binding
Index(es):
Date
Thread