• 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
Re: NSButtonCell Relating To NSTableView Object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSButtonCell Relating To NSTableView Object (From: Oliver Cameron <email@hidden>)

  • Prev by Date: Reading Hex from a file
  • Next by Date: Re: Reading Hex from a file
  • Previous by thread: NSButtonCell Relating To NSTableView Object
  • Next by thread: WYSIWIG drawing vs printing (was drawing scaled lines)
  • Index(es):
    • Date
    • Thread