> On Apr 4, 2017, at 4:34 PM, Daryle Walker <dary...@mac.com> wrote:
> 
> 
>> On Apr 4, 2017, at 9:57 AM, Keary Suska <cocoa-...@esoteritech.com> wrote:
>> 
>> 
>>> On Apr 3, 2017, at 5:40 PM, Daryle Walker <dary...@mac.com> wrote:
>>> 
>>> Is there a way to affect the font of a table cell via Bindings? The few 
>>> times I tried, at the NSTextField level (NSTableCellView does not have any 
>>> font-related Bindings), resulted in Xcode’s XIB compiler jamming. (I always 
>>> cancel and take out the change.)
>> 
>> Remember that NSTableCellView subviews cannot bind outside of the 
>> NSTableCellView. The easiest approach is to have the font a property on the 
>> model object set as NSTableCellView’s objectValue, and bind to that.
> 
> My model just stores strings.

So? Do you have a religious belief against mixing class properties? (Sorry, 
couldn’t resist ;-) If the issue is persistence, the value would be transient 
and not stored (as it is stored elsewhere).

> So, I would have to make a value-transformer that reads the font preference 
> from the user-defaults and create a attributed-string with the model string 
> in the desired font?

You could, but you wouldn’t be able to easily update the UI when the font is 
changed.

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

This email sent to arch...@mail-archive.com

Reply via email to