FROM : Brad Miller
DATE : Tue Nov 30 08:24:15 2004
I'm starting to run around in circles with something that doesn't seem
like it should be hard, so I figure I'm missing something simple or
doing something stupid. =)
I had an NSTextVIew that's value was bound to my model. Everything
worked great. We needed to add drag and drop for a couple of the app's
features. So I subclassed NSTextView, added the needed functionality,
then build the view in the window (custom view with it's class set to
MyTextView and packed in a scroll view). Everything works great at
this point, the text view acts like it should and my drag and drop
works as desired.
Now comes the problem. Binding the view back to my model. I'm
manually binding it with: [myTextView bind:@"value"
toObject:documentController withKeyPath:@"selection.textValue"
options:nil], which is the same binding I was using before. Launching
the app give a class not KVC compliant message in the run log. From
reading the docs and the list archives, I was under the impression that
you can still bind to a values that a super class exposes. Am I
missing something here or is the an additional step I'm missing?
Thanks,
Brad
DATE : Tue Nov 30 08:24:15 2004
I'm starting to run around in circles with something that doesn't seem
like it should be hard, so I figure I'm missing something simple or
doing something stupid. =)
I had an NSTextVIew that's value was bound to my model. Everything
worked great. We needed to add drag and drop for a couple of the app's
features. So I subclassed NSTextView, added the needed functionality,
then build the view in the window (custom view with it's class set to
MyTextView and packed in a scroll view). Everything works great at
this point, the text view acts like it should and my drag and drop
works as desired.
Now comes the problem. Binding the view back to my model. I'm
manually binding it with: [myTextView bind:@"value"
toObject:documentController withKeyPath:@"selection.textValue"
options:nil], which is the same binding I was using before. Launching
the app give a class not KVC compliant message in the run log. From
reading the docs and the list archives, I was under the impression that
you can still bind to a values that a super class exposes. Am I
missing something here or is the an additional step I'm missing?
Thanks,
Brad
| Related mails | Author | Date |
|---|---|---|
| Brad Miller | Nov 30, 08:24 | |
| mmalcolm crawford | Nov 30, 09:03 | |
| mmalcolm crawford | Dec 1, 04:14 |






Cocoa mail archive

