Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView binding with CoreData



<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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSTextView binding with CoreData (From: Nathan Gilmore <email@hidden>)
 >Re: NSTextView binding with CoreData (From: mmalc crawford <email@hidden>)
 >Re: NSTextView binding with CoreData (From: Michael Fey <email@hidden>)
 >Re: NSTextView binding with CoreData (From: mmalc crawford <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.