Re: Populate NSTextView from NSPopupButton
Re: Populate NSTextView from NSPopupButton
- Subject: Re: Populate NSTextView from NSPopupButton
- From: Tom Quest <email@hidden>
- Date: Thu, 14 Sep 2006 13:56:50 +0200
Thanks Felix, it looks better now, but still doesn't work properly.
Wenn the application launches the PopupButton selects its default
value and the corresponding text is now being displayed in the
TextView. When I change the value in the popup it still isn't
reflected in the TextView. I checked the Bindings Ref Page for the
PopupButton but the only values that seem plausible to me to fill
are: content & contentValues. Binding selectedValue doesn't work as
well. Is there another binding that has to be set ?
On Sep 14, 2006, at 12:45 PM, Felix Franz wrote:
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