Cocoa Bindings and commit editing changes
Cocoa Bindings and commit editing changes
- Subject: Cocoa Bindings and commit editing changes
- From: Tod Cunningham <email@hidden>
- Date: Sat, 17 Jul 2004 17:55:54 -0400
What is the recommend way to commit changes to a bound field? I have a
field bound directly to an object using KVC. It isn't going through an
instance of controller, it is being bound through an instance my
"File's Owner".
[demime 0.98b removed an attachment of type image/tiff which had a name of pastedGraphic1.tiff]
The binding works fine, but when I push the Add button on the form, I
want to do something with the data. However, the data hasn't been
committed from text field. I tried the obvious solution of changing
the first responder.
- (IBAction)addContact:(id)sender
{
CLLogBook *logBook = [myDocument logBook];
[[self window] makeFirstResponder:[self window]];
[logBook insertObject:contact inLogEntryListAtIndex:[logBook
countOfLogEntryList]];
}
Changing the first responder does work, but I am concerned that the
validation rules for the field are being ignored. Is there a
recommended way to do this?
Thanks,
Tod Cunningham
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.