On Feb 18, 2010, at 5:29 PM, Jerry Krinock wrote:

> I know how to control the font size in a table -- the hard way -- by 
> subclassing NSTableColumn and overriding -dataCellForRow.  Hoping for an easy 
> way, I noticed that NSTableView has a 'fontSize' binding...

Why do that, when you could just use the willDisplayCell delegate method?

> fontSize.  An integer value that determines the size, in points, of the font 
> used to display the NSTableView.  If fontSize is bound, the font binding is 
> disabled.
> 
> Whoopee!  So, in Interface Builder, I leave 'font' unbound, and bind thus:
> 
> fontSize
>  Bind to: Shared User Defaults Controller
>  Controller Key: values
>  Model Key Path: myFontSize
> 
> myFontSize is a key in my user defaults.
> 
> Result: It just doesn't work.  Silently ignores the value in user defaults, 
> both upon awaking and when it is changed.
> 
> This was reported also by Chris Miner two years ago:
> 
> http://www.cocoabuilder.com/archive/cocoa/197369-under-what-circumstances-does-the-fontsize-binding-of-nstableview-have-an-effect.html?q=NSTableView+fontSize+binding#197369

That poster seemed to say that the font was nil. If this is the case, font size 
could not produce defined results. What happens when you bind "font" as well?

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to