Re: Cocoa Custom NSCell Binding Issue
Re: Cocoa Custom NSCell Binding Issue
- Subject: Re: Cocoa Custom NSCell Binding Issue
- From: Sean Willson <email@hidden>
- Date: Fri, 13 Jan 2006 11:31:58 -0600
this looks very promising. i really didn't mean this conversation to turn
into a RTFM moment. i really have been digging into the manuals. what i just
don't quite understand is that the only way a table interacts with a NSCell
is via the setObjectValue and objectValue methods. given this it would seem
logical that that would be the binding i notify, but it doesn't work.
i'll try your recommendations tonight and also override the
bind:toObject:withKeyPath:options: method to see if in fact it is using the
objectValue binding point or in fact some other one.
thanks for the help.
sean
On 1/13/06, Casey Fleser <email@hidden> wrote:
>
> I think you may need to add something like this to when in your
> NSCell to get the new value into your controller:
>
> - (void) updateValue: (id) inValue
> forBinding: (NSString *) inBinding
> {
> NSDictionary *bindingInfo = [self infoForBinding: inBinding];
>
> if (bindingInfo != nil) {
> NSString *observedPath = [bindingInfo objectForKey:
> NSObservedKeyPathKey];
> id observedObj = [bindingInfo
> objectForKey: NSObservedObjectKey];
>
> if (observedPath != nil && observedObj != nil)
> [observedObj setValue: inValue forKeyPath:
> observedPath];
> }
> }
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden