• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextView's "data" binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSTextView's "data" binding
      • From: Yann Bizeul <email@hidden>
    • Re: NSTextView's "data" binding
      • From: mmalc crawford <email@hidden>
References: 
 >NSTextView's "data" binding (From: Yann Bizeul <email@hidden>)

  • Prev by Date: NSTextView's "data" binding
  • Next by Date: Re: NSTextView's "data" binding
  • Previous by thread: NSTextView's "data" binding
  • Next by thread: Re: NSTextView's "data" binding
  • Index(es):
    • Date
    • Thread