Re: NSFormatter interfering with bindings continuous update?
Re: NSFormatter interfering with bindings continuous update?
- Subject: Re: NSFormatter interfering with bindings continuous update?
- From: Joe Wildish <email@hidden>
- Date: Thu, 21 Jun 2007 11:25:46 +0100
All,
I have a custom subclass of NSFormatter attached to an NSTextField
(done programmatically). The text field is bound and configured to
"Continuously Update Values". The behaviour I am getting is that the
first time a change is made to the field, the setter method gets
called as you would expect. However, all subsequent changes to the
field do not trigger the setter method - the next time it is called
is when focus is moved away from the control.
My formatter isn't doing too much, but I stripped it down to the bare
minimum anyway:
- (NSString *)stringForObjectValue:(id)obj {
return [NSString stringWithString:obj];
}
- (BOOL)getObjectValue:(id *)obj forString:(NSString *)string
errorDescription:(NSString **)error {
* obj = [NSString stringWithString:string];
return YES;
}
Even with this formatter, the behaviour is still as described. If I
*don't* attach the formatter, the binding works as you would expect.
I would be grateful if someone might be able to point out what I'm
doing wrong.
Cheers,
-Joe
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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