Re: Populate NSTextView from NSPopupButton
Re: Populate NSTextView from NSPopupButton
- Subject: Re: Populate NSTextView from NSPopupButton
- From: Felix Franz <email@hidden>
- Date: Thu, 14 Sep 2006 12:45:09 +0200
Hi Tom,
On Sep 14, 2006, at 11:59 AM, Tom Quest wrote:
MyArrayController is bound to a Core Date Object with the
attributes 'name' (to be shown in the popup) and 'text'(to be shown
in the textview).
As long as I don't bind the TextView the PopupButton shows a list I
can select from. When I bind the TextView I get the following
error: "Cannot create NSData from object [...] of class
NSCFString". The [...] is the value that ist stored in Core Data
for the 'text' attribute.
the "data"-binding expects an NSData object. If your text-attribute
is an string
you better off using NSTextView's "value"-binding. (You have to
configure the NSTextView
to display using a single font).
See <file:///Developer/ADC Reference Library/documentation/Cocoa/
Reference/CocoaBindingsRef/BindingsText/NSTextView.html#//apple_ref/
doc/uid/NSTextView-DontLinkElementID_612> for the Value bindings of
NSTextView.
HTH
felix
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden