Re: NSTextView's "data" binding
Re: NSTextView's "data" binding
- Subject: Re: NSTextView's "data" binding
- From: mmalc crawford <email@hidden>
- Date: Sat, 28 Apr 2007 08:29:35 -0700
On Apr 28, 2007, at 8:12 AM, Yann Bizeul wrote:
The problem is I want to bind "data" of this NSTextView to my
NSManagedObject.
When creating my NSTextView :
[...]
[textView setRichText:YES];
[self bind:@"data" toObject:textView withKeyPath:@"data" options:nil];
You bind the text view, not the managed object.
Review <http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/WhatAreBindings.html
> and <http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/HowDoBindingsWork.html
>.
Moreover, you should almost certainly be binding to an intermediary
controller (an instance of a subclass of NSController) and not
directly to the managed object.
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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