Skip navigation.
 
mlNSTextView's "data" binding
FROM : Yann Bizeul
DATE : Sat Apr 28 17:12:14 2007

Hello the list.

I have to create a NSTextView by hand (programmatically), it is not 
embedded in a NSScrollView, and its superview is a NSView's subclass 
handling moving and sizing with the mouse.

The problem is I want to bind "data" of this NSTextView to my 
NSManagedObject.

So what do I do ? :

When creating my NSTextView :

[...]
[textView setRichText:YES];
[self bind:@"data" toObject:textView withKeyPath:@"data" options:nil];
[...]

I have a NSData *data ivar in my object.

I get that in log when the binding code is executed :

2007-04-28 17:08:03.225 KineSlide[10879] [<NSTextView 0x15e3d210> 
valueForUndefinedKey:]: this class is not key value coding-compliant 
for the key data.

So obviously there is either something wrong in the doc or in my code.

Did someone already make this work ?

Thanks

Yann Bizeul • yann at tynsoe.org
Cocoa Developer

Tynsoe Projects
BuddyPop • GeekTool • SSH Tunnel Manager • ...
http://projects.tynsoe.org/

Related mailsAuthorDate
mlNSTextView's "data" binding Yann Bizeul Apr 28, 17:12
mlRe: NSTextView's "data" binding mmalc crawford Apr 28, 17:29
mlRe: NSTextView's "data" binding mmalc crawford Apr 28, 17:48
mlRe: NSTextView's "data" binding Yann Bizeul Apr 28, 18:42
mlRe: NSTextView's "data" binding Shawn Erickson Apr 28, 19:06
mlRe: NSTextView's "data" binding Yann Bizeul Apr 30, 00:04
mlRe: NSTextView's "data" binding mmalc crawford Apr 30, 00:28
mlRe: NSTextView's "data" binding Yann Bizeul Apr 30, 00:50