Re: NSTextView binding with CoreData
Re: NSTextView binding with CoreData
- Subject: Re: NSTextView binding with CoreData
- From: Michael Fey <email@hidden>
- Date: Tue, 31 Jul 2007 11:37:20 -0400
<eatCrow>
Well I'll be. For some reason we had it stuck in our heads that
binding our "description" field to an NSTextView's value field wasn't
working. There's a good chance that we had the "Multiple fonts
allowed" checkbox checked when we started.
So, yes, your original problem is that you were trying to bind to the
data field instead of the value field.
I'm glad we went down this path, it lets us get rid of some code that
we just don't need.
</eatCrow>
On Jul 31, 2007, at 10:25 AM, mmalc crawford wrote:
On Jul 31, 2007, at 5:13 AM, Michael Fey wrote:
While the NSTextView will not accept NSString data, it will accept
NSAttributedString data.
NSTerxtView does work with NSString objects -- use the 'value'
binding (see <http://developer.apple.com/documentation/Cocoa/
Reference/CocoaBindingsRef/BindingsText/NSTextView.html>)...
we wrote a "StringToAttribStringTransformer" that is a subclass of
NSValueTransformer
...this is therefore unnecessary.
(The 'value' binding "is only available when the NSTextView is
configured to display using as a single font", but since you're
throwing away any formatting information in the transformation,
this shouldn't really matter.)
mmalc
_______________________________________________
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