Re: Cocoa Custom NSCell Binding Issue
Re: Cocoa Custom NSCell Binding Issue
- Subject: Re: Cocoa Custom NSCell Binding Issue
- From: Casey Fleser <email@hidden>
- Date: Fri, 13 Jan 2006 09:51:17 -0600
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];
}
}
Casey
On Jan 12, 2006, at 9:35 AM, Sean Willson wrote:
It sounds like your setObjectValue: method is being called, but is
your objectValue method? Which way round are they being called?
I have fully implemented the objectValue method conforming to the
interface,
added some NSLog statements in there to see if it ever gets called
and it
does not. Is there something special that I have to do to get this
working.
How does the NSArrayController that is controlling the Object A
references
and binding to the UI get notified that the componant has set a new
value
that it needs to propigate down to Object A? That seems to be the
part that
is missing. That's why I said that I tried firing the "will" and "did"
change notifications for objectValue but that didn't work. I know
this has
to be something small but I can't seem to find any examples that
show a
custom NSCell type element using Cocoa Bindings.
_______________________________________________
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