Re: Custom NSView binding
Re: Custom NSView binding
- Subject: Re: Custom NSView binding
- From: Livio Isaia <email@hidden>
- Date: Tue, 01 Nov 2011 23:27:42 +0100
Il giorno 01/nov/2011, alle ore 20.16, Quincey Morris ha scritto:
> 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*.
>
>
Thank you for your answer,
but i can't figure out which method(s) I must implement. I tried with some of them and still doesn't work (e.g. valueForKey:)
Regards,
livio._______________________________________________
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