• 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: Triggering NSTextView changes and bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Triggering NSTextView changes and bindings


  • Subject: Re: Triggering NSTextView changes and bindings
  • From: Michael Ash <email@hidden>
  • Date: Sun, 1 Feb 2009 12:24:37 -0500

On Sun, Feb 1, 2009 at 11:45 AM, Chris Idou <email@hidden> wrote:
> I've got an NSTextView whose attributeValue is bound to a core-data object.
>
> I've got a menu item which programmatically modifies the NSTextView's contents.
>
> The programmatic changes don't trigger a modification to the underlying object unless the user tabs to and exits the NSTextView manually.
>
> What is the correct way, when programmatically modifying an NSTextView, to make sure the system propagates changes to underlying bindings?

The correct way is not to do it in the first place.

Views are there for the user to modify, not for your program to
modify. Bindings are two-directional: your program should change the
*model*, and then the binding will ensure that the NSTextView matches
that change.

Mike
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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

References: 
 >Triggering NSTextView changes and bindings (From: Chris Idou <email@hidden>)

  • Prev by Date: Minimum System Version Check - With Reliable Notification
  • Next by Date: Re: NSTextField with an date formatting
  • Previous by thread: Triggering NSTextView changes and bindings
  • Next by thread: Re: NSTextField with an date formatting
  • Index(es):
    • Date
    • Thread