Re: Odd binding issue
Re: Odd binding issue
- Subject: Re: Odd binding issue
- From: Scott Anguish <email@hidden>
- Date: Fri, 12 Mar 2004 01:17:41 -0500
On Mar 11, 2004, at 10:54 PM, T Reaves wrote:
Hello all.
I have a simple app that uses manual bindings. It has several text
fields and text views. One of the text views binds an NSTextView like
so:
// bind itemDescription
[bindingOptions setObject:@"No Description"
forKey:@"NSNullPlaceholder"];
[itemDescription bind:@"string" toObject:itemController
withKeyPath:@"selection.description" options:bindingOptions];
OK, as an aside...
itemDescription is the NSTextView, and you're trying to set a binding
called string on it??
there is no binding called string for NSTextView. (excuse the
formatting, it's from something else)
Availability Bindings -
editable -
hidden -
Font Bindings -
font -
fontBold -
fontFamilyName -
fontItalic -
fontName -
fontSize -
Text Color Bindings -
textColor -
Value Bindings -
data -
value -
valuePath -
valueURL -
So you'd want to bind it to value (which takes an NSString, but is
only available when the NSTextView is set to single font mode.)
[itemDescription bind:@"value" toObject:itemController
withKeyPath:@"selection.description" options:bindingOptions];
Anyways.. the problem you're seeing is that selection.description is
not a method that Item seems to implement, so you're getting the basic
-description result stuck in there..
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.