On Mar 13, 2009, at 10:43 AM, Kyle Sluder wrote:

On Fri, Mar 13, 2009 at 1:34 PM, Corbin Dunn <[email protected]> wrote:
Either solution is perfectly acceptable, and we'll increase our
documentation to help developers understand the process of displaying cells.

How about instead of changing the object value to an attributed string
the framework instead changes the attributes of the cell?

This is a possibility, however, you may notice there is no way to just make a generic NSCell 'bold'. The only way to do this is with an NSAttributedString, which is why this route was chosen.

Ultimately, the -willDisplayCell: method is the ideal "last place" that a developer can change anything they want about the cell using a delegate method.


Or if
NSTableView is going to go to lengths to substitute a bold attributed
string in place of my plain string, why can't it also uppercase my
strings when they are group rows in a source-list highlighting style?

That's a good point, and it is something we did consider. However, also consider strings may be localized, and that localizations may have specific or different ways of doing capitalization. So, instead of dealing with the possibility of getting it wrong, we simply just provide the correct formatting attributes. For the "group row" case in "source lists", we will bold the font, and apply a special color based on the window key state.

As usual, if you feel there are things we could do to improve the frameworks, please do log bugs. We read them all and do make changes based on feedback.

corbin


_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to