• 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: Displaying a table entry in Bold
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying a table entry in Bold


  • Subject: Re: Displaying a table entry in Bold
  • From: Joe Morris <email@hidden>
  • Date: Fri, 19 Apr 2002 15:46:42 -0400

On Friday, April 19, 2002, at 03:28 PM, Ondra Cada wrote:

Actually, to be really independent you would have to check whether there is a formatter and, if so, use it to translate the "string" of yours to real string. Even without a formatter this won't work properly eg. if the objectValueForTableColumn:row: happens to be say an NSNumber, which is quite possible generally.

The proper way to do that (in cases like this when you want the whole cell'
s format to be unique) is not to play with attributed strings at all, and just to set cell's attributes directly. Then let it to display the data itself: why to re-write an already existing code?

True - I have the benefit of the knowledge that I don't use any formatters and all my objects are strings. I forgot to include those assumptions.

I agree, setting the cell's attributes would be the best way. The only reason I did not do that was because looking around the description of NSCell, I couldn't find any good way to do that. I saw attributes that had to do with buttons' states, and other things like that, but nowhere did I see something that would let me change the font type to bold or the color to blue, for instance. If you can show me how to do that, I'd much rather use the more generic approach. :-)

-Joe

---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Displaying a table entry in Bold (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Displaying a table entry in Bold
  • Next by Date: Re: Displaying a table entry in Bold
  • Previous by thread: Re: Displaying a table entry in Bold
  • Next by thread: Re: Displaying a table entry in Bold
  • Index(es):
    • Date
    • Thread