• 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: Problems with NSCell setObjectValue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with NSCell setObjectValue


  • Subject: Re: Problems with NSCell setObjectValue
  • From: Hrishikesh Murukkathampoondi <email@hidden>
  • Date: Sun, 22 Aug 2010 11:54:54 +0530

>The 'dataCellForTableColumn:...' delegate method is intended to return a data cell for the >table column to use>, but *not* to configure the cell value for the specific row it's going >to represent. Remember that the object val>ue comes from the data source object, not the del>egate object, and it's therefore wrong for the delegate objec>t to try to supply the value.
I don't understand your answer.
The documentation for -tableView:dataCellForTableColumn:row: says
"A different data cell can be returned for any particular table column and row, or a cell that will be used for the entire row (a full width cell)."
What I am trying to do is to display multiple text items arranged in a custom format. For that purpose I use this delegate method to return my "custom cell" wherein I have modified drawWithFrame:inView: to do my custom drawing.
From the documentation I understand that this delegate method is used to return an NSCell subclass. This subclass can include a custom method to draw the cell.
Couple of questions:
- If this is not the right way to do what I described. Could someone point me in the right direction?
- Out of curiosity, for what other purpose can -tableView:dataCelForTableColumn:row: be used.
Thanks
Hrishi

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Problems with NSCell setObjectValue
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Getting Source List font sizes right
  • Next by Date: Re: Problems with NSCell setObjectValue
  • Previous by thread: Re: Problems with NSCell setObjectValue
  • Next by thread: Re: Problems with NSCell setObjectValue
  • Index(es):
    • Date
    • Thread