Re: NSButtonCell Relating To NSTableView Object
Re: NSButtonCell Relating To NSTableView Object
- Subject: Re: NSButtonCell Relating To NSTableView Object
- From: Fritz Anderson <email@hidden>
- Date: Sat, 8 Jan 2005 19:00:33 -0600
There is only one cell per NSTableColumn. The cell gets relocated and
re-valued for each row in the table. NSTableView gives its delegate an
opportunity to intervene in the re-valuation and appearance of the cell
with the delegate method tableView:willDisplayCell:forTableColumn:row:.
Use the column parameter to verify that you're dealing with the button
column, the row parameter to index into your data source, and then send
setEnabled: to the cell you are passed, accordingly.
-- F
On 7 Jan 2005, at 3:40 PM, Oliver Cameron wrote:
As I was saying before, my NSTableView uses an object for each row
that holds properties, one property is "isEnabled", which is a BOOL,
and this is set by the method "setEnabled:".
Now, I am having trouble understanding how I would go about relating
the NSButtonCell to the Object, so that when the button was enabled,
the Object in the same row's method, "setEnabled:", would be set to
YES, and when the button was disabled, the method would be set to NO.
--
Fritz Anderson
Consulting Programmer Chicago, Illinois
http://resume.manoverboard.org/
_______________________________________________
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