Re: NSTextFieldCell text color issue in NSTableView with source list highlighting
Re: NSTextFieldCell text color issue in NSTableView with source list highlighting
- Subject: Re: NSTextFieldCell text color issue in NSTableView with source list highlighting
- From: Corbin Dunn <email@hidden>
- Date: Fri, 13 Mar 2009 11:02:22 -0700
On Mar 13, 2009, at 10:43 AM, Kyle Sluder wrote:
On Fri, Mar 13, 2009 at 1:34 PM, Corbin Dunn <email@hidden>
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@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