• 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: Custom NSView binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom NSView binding


  • Subject: Re: Custom NSView binding
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 01 Nov 2011 12:16:46 -0700

On Nov 1, 2011, at 11:54 , Livio Isaia wrote:

> I created an IB plug-in with a subclass of NSView with an exposed bind of type NSNumber, and then I bind it to a MyNSImageView through an NSObjectController (this is made directly in IB).
> Now, everything works fine, except that when the method setSelectedIndex: from MyClass is called the bound NSImageView doesn't receive any change notification.
> Can anyone tell me why?

Based on the information you've given us:

You *exposed* (i.e. declared) a binding called "type", but you haven't *implemented* that binding.

So, when you establish the particular binding relationship from a MyClass object to a MyNSImageView object, the automatic KVO portion of the binding (changes to the MyNSImageView object get pushed back to the MyClass object) works, but the part you're supposed to provide (pushing changes from the MyClass object to the MyNSImageView object) doesn't.

In other words, if you don't provide any code for the binding, it'll sort of appear to work, but *in one direction only*.


_______________________________________________

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

  • Follow-Ups:
    • Re: Custom NSView binding
      • From: Livio Isaia <email@hidden>
References: 
 >Custom NSView binding (From: Livio Isaia <email@hidden>)

  • Prev by Date: Re: Problems with runModalForWindow, looking for alternatives
  • Next by Date: Re: Write to file Entitlement
  • Previous by thread: Custom NSView binding
  • Next by thread: Re: Custom NSView binding
  • Index(es):
    • Date
    • Thread