• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cocoa Bindings and commit editing changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Cocoa Bindings and commit editing changes
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Rounding to two decimals
  • Next by Date: my arrays are being deallocated, and i dky
  • Previous by thread: Re: Rounding to two decimals
  • Next by thread: Re: Cocoa Bindings and commit editing changes
  • Index(es):
    • Date
    • Thread