Re: NSTableColumn's 'fontSize' Binding: Just Doesn't Work?
Re: NSTableColumn's 'fontSize' Binding: Just Doesn't Work?
- Subject: Re: NSTableColumn's 'fontSize' Binding: Just Doesn't Work?
- From: Keary Suska <email@hidden>
- Date: Thu, 18 Feb 2010 18:32:03 -0700
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 (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